0

Hi Guys,
I have set up a cron job on a Centos server that is supposed to execute a script that looks for SMS messages in a queue and processes them. My crontab file is under /etc/crontab. The job is supposed to be run after every 5 minutes. The command I have added to the crontab file is 01 * * * * root /usr/local/bin/readsms.pl to make it run after every minute. However, when I look at the cron log, the job is running after every one hour. Please help me figure out whether its my command that is wrong because as I understand it the command 01 * * * * root /usr/local/bin/readsms.pl is supposed to execute the script after every one minute.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by c-tech
0

It appears the the zero is being read as minutes and the one as the hour. I doubt any of the cron programmers allowed for someone entering "01" instead of just "1".

0

P.S The 01 was added automatically even though in the command I had put only 1 without a zero. I was able to sort it out. It seems that if you just want the job to be executed every minute, you do not have to specify the 1, you just type in the command as * * * * * <owner> /<path to script>. And I think this makes sense because a minute is the least time you can specify for intervals of job executions.
Thanks for the reply woooee; nice name :) by the way.

Edited by c-tech: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.