Cron is not working

Devin D    Sep 19 3:45PM 2017

I can see that my esxi server is running the cron because the system log shows that it is executing the cron, but nothing happens. There is no error and nothing is actually run. Once in the directory /opt/varticalbackup, can manually run the following flawlessly:

nohup ./vertical backup --email --subject "Successful Backup" --failure-subject "Backup FAILED" --threads 8 &

This is the command I use for the cron creation:

./vertical -v cron "00 3 * * *" --email --subject "Successful Backup" --failure-subject "Backup FAILED" --threads 8 "&> /opt/verticalbackup/vertical.log"

It makes the cron, but the log file is not created or written to. I also tried creating the log file and giving it full open perms yet it still doesn't work. The only logs I get are from the syslog for cron.


gchen    Sep 19 9:15PM 2017

The double quotes will be filtered out by bash before they can be inserted in the the cron line, so you'll need to enclose them with single quotes, like:

./vertical -v cron "00 3 * * *" --email --subject '"Successful Backup"' --failure-subject '"Backup FAILED"' --threads 8 "&> /opt/verticalbackup/vertical.log"

If this still doesn't work, post the cron line in the file /var/spool/cron/crontabs/root.


Devin D    Sep 20 10:28PM 2017

That worked perfectly. Thanks!


Log in to comment
Copyright © Acrosync LLC 2017