I\'ve spent two days trying to understand why I can not get cron to work on my Ubuntu EC2 instance. I\'ve read the documentation. Can anyone help? All I want is to get a wor
On some AWS Ubuntu EC2 machines, cron jobs cannot be edited or made to run by using crontab -e
or even sudo crontab -e
(for whatever reason). I was able to get cron jobs working by:
touch /home/ubuntu/crontest.log
to create a log filesudo vim /etc/crontab
which edits the system-wide crontab* * * * * root date && echo 'It works!'>> /home/ubuntu/crontest.log 2>&1
which dumps stdout and stderr into the logfile you created in step 1cat /home/ubuntu/crontest.log
to see the output of the cron job