Currently running Ubuntu 12.04 LTS 64-bit with 3.5.0-28-generic for the kernel. This is all as a guest in VirtualBox 4.2.18.
I'm trying to setup a cronjob thru crontab under root account and continue to get the following error when trying to save it.
The goal of the cronjob is to run apt-get commands to update the system without me having to do anything.
Here is the error message
"/tmp/crontab.iuvXOC/crontab":24: bad minute
errors in crontab file, can't install.
Here is the cronjob
00 20 * * * root (apt-get update && apt-get -y -d upgrade) > /var/log/aptupdate.log
I found this example to test the syntax for cron and here is the output from that
root@ubuntu64vm:/var/log# cat -v /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
By chance, the syntax color changes to green if I replace the leading zero from 0 to :
However when I try to back out of vim, I still get the same error message.