When I run crontab -e
on my Debian server and add these lines:
# System statistics
*/10 * * * * /usr/lib/sysstat/sa1 1 1 > /dev/null 2>&1
59 23 * * * /usr/lib/sysstat/sa2 -A > /dev/null 2>&1
after save, the crontab complains:
crontab: installing new crontab
"/tmp/crontab.xSbhwZ/crontab":30: bad day-of-week
errors in crontab file, can't install.
This is line 30: */10 * * * * /usr/lib/sysstat/sa1 1 1 > /dev/null 2>&1
. When I comment this line, it's all fine.
Any thoughts?
Best Answer
I had the same error,although the bad space was not entered by OSX but by some gremlin. I fixed the problem by pulling the crontab into a file
And then replacing all the 'spaces' in the file with true spaces. I then pulled that text file back into the crontab :