linux - How to test a cron job? -
i'm using ubuntu linux 10.0.4. want run script every 6 hours, every day. when issue sudo crontab -e
, see:
# m h dom mon dow command * 00,06,12,18 * * * /opt/scripts/selenium/run_nis_inf_tests.sh
however, i'm not seeing expected outcome script, , i'm not sure if running. there way test, short of waiting until specified time, script running properly. or, how can view errors script generating? - dave
you can update mailto variable email address, , cron should email stdout , stderr output. check syslog file /var/log/messages see if script being executed cron.
-tony
Comments
Post a Comment