I know that cron is supposed to be “rock solid” and reliable and everything. But I cannot seem to get one simple job setup correctly
What have I done?
- I’ve created a bash script and made it executable for everyone
chmod a+x scriptname.sh
- I tested it by executing it manually. It checks if a certain process is running and restarts it if necessary. It works
- I checked cron is running with
ps -ef | grep cron
. It’s showing me/usr/sbin/cron -f
for root - I ran
crontab -e
and added the script like this
*/5 * * * * /full/path/to/script.sh
When saving, crontab told me that is has been installing new crontab
Now, when I kill the process and wait for much more than 5 minutes … nothing happens. The process will not be restarted.
I must be doing something very wrong very stupidly.