crontab test
How can I test my crontab? Is there a command I can run to test it?
|
What kind of test? Here's some things I do...
|
It is very easy. All you have to do is think logically
1st place to look is in the logs. On Redhat, and variants, the file to examine is /var/log/cron I am not sure about its whereabouts on Debian, but I'd suspect it's pretty much the same. Try Code:
tail /var/log/cron That file is basically a list with the times and commands that cron executed. Another option would be to add a line to your crontab like this Code:
* * * * * wall test |
For me under Ubuntu 11.04, "wall test" failed. This worked, though
Code:
* * * * * echo "Cron Worked $(date)" >> /tmp/cronworked.txt Under Ubuntu, if it did NOT work, errors are in /var/log/syslog |
Linux cron job scheduling
An article explaining the Linux cronjob scheduling with the help of examples.
http://www.thegeekscope.com/linux-cron-job-scheduler/ Hope you will find this post useful ! |
All times are GMT -5. The time now is 01:23 PM. |