Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

What's the simplest test that I can do to check if my cron jobs are working?

share|improve this question
    
Do you want a simple or reliable check? –  Jan Jungnickel Sep 1 '09 at 10:40
    
Simple check will do, like Andy's answer. A more complicated check might also prove useful in the future. –  Randell Sep 1 '09 at 10:51
    
What's with the downvote? –  Randell Dec 8 '09 at 8:42
add comment

marked as duplicate by Ladadadada, growse, Michael Hampton, mdpc, Falcon Momot May 19 '13 at 17:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 5 down vote accepted

Set up a test cron:

*/5 * * * * echo "test" > /tmp/crontest.txt

This will write "test" to the file /tmp/crontest.txt every 5 minutes

Ensure the cron daemon crond is running using

[andy@server]# ps aux | grep cron

root 4321 0.0 0.0 76543 3211 ? Ss Jul31 0:07 crond

Check the logs using

tail /var/log/cron

Try date to ensure you are in the correct timezone

share|improve this answer
    
I had to make the first parameter to 0-59/5 to make it work. –  Randell Sep 1 '09 at 10:34
    
Apologies it should have read */5, have amended answer –  Andy Sep 1 '09 at 10:47
add comment

Simply change their execution time and see the result ! :)

If you have cron that will run on

12 24 * * *

change it to

mm hh * * *

where hh and mm is an hour and minute very near to the actual time.

Once verified the execution restore the correct timing

share|improve this answer
    
+1 for tip on changing the execution time –  Randell Sep 1 '09 at 10:49
add comment

/2**** touch cronrunning >/root/Desktop

it will show u file coming to desktop

share|improve this answer
1  
Downvoted: Bad practice, invalid syntax, bad spelling. –  Jan Jungnickel Sep 1 '09 at 10:39
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.