cron jobs problem in cPanel ???

map007

Active Member
Jun 5, 2008
43
0
56
Hello,

I have set cron to run in every five min. but the cron is executing after 1 second.

ex..

i have set on

10.00
10.05

and it runs on

10.00.01
10.05.01

Please guide me how can i solve this problem.
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
The lowest interval for crontab is a minute ...

You are seeing "1" second logged because that is the time it took
for your script to start executing and that execution get logged.

Your crons are actually firing off correctly based on what you quoted. :cool:
 

map007

Active Member
Jun 5, 2008
43
0
56
Hi Spiral,

Thanks for your reply...

Yes you are right but i want to that cron at fix time , it means 10.00.00 not on 10.00.01 so please guide me how can i do this....

Thank you.
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
If it takes 1 second for your script to run, you need to run it 1 second early ...

Subtract 1 minute from the scheduled running time ...

Put in a "sleep 58" or "sleep 59" line in the top of your cron script
to have it wait almost a full minute before continuing processing
and you may have to play around with it a bit, but you may be
able to time it such that your script finishes running at the
exact time that you want.