Pale Purple http://www.palepurple.co.uk Office Address Basepoint Business Centre Isidore Road,,
Bromsgrove, Worcestershire, B61 3ET GB
+44 (0) 845 0046 7 46 sales@palepurple.co.uk GB 884 6231 01
Dear other web developers ….
if you’re going to add a cron job to a (web) server, please make sure any output is sent to a valid email address (or log file) which is monitored….
This can be achieved through a number of ways :
Having cron job output ‘disappear’ in the ether only results in errors going unnoticed, and unexplained behaviour on the site(s) in the future.
So – as an example – a ‘bad’ cron file may look like the following :
## m h dom mon dow command
0,15,30,45 * * * * bash /path/to/command/cron/instance.sh > /dev/null 2>&1
Problems :
A better cron file would look like :
MAILTO=support@example.org
0,15,30,45 * * * * bash /path/to/command/cron/instance.sh >/var/log/cron.log
(This minor rant is triggered by discovering a web server sending ~700 emails a day to a non-existent mailbox … most of which look like error reports which ought to be investigated/fixed).
‹ Mobile Traffic on the up! Conference season (2013) ›