I have a short script which should launch an app, wait for an hour, then kill it and wait for a minute. It only starts the app. I tried to run the script both as a normal user and root, but nothing helped.
while (true); do
./app
sleep 3600
pkill -f app
sleep 60
done