KoblentsBlog Photography
Contact About
Ches
Bluehost Cron Silent Failures
I use bluehost. I needed to set up a cron job to run a perl script. Unfortunately, it was failing silently; the cron job - according to their cpanel configuration - is supposed to mail you; but mail was not showing anything as it usually does for cron output.
If this describes your problem, the solution is simple: append 2>&1 to your command. This will put the errors into your output instead of silently ignoring them. Also, if you currently don't save output, do that too: /path/to/cmd > /path/to/log.txt 2>&1.
Ches Koblents
August 10, 2017
 
Older »
© Copyright Koblents.com, 2012-2017