cron job not running for big time intervals

Reply

Join Date: Mar 2009
Posts: 22
Reputation: aman_dba is an unknown quantity at this point 
Solved Threads: 0
aman_dba aman_dba is offline Offline
Newbie Poster

cron job not running for big time intervals

 
0
  #1
Oct 24th, 2009
hi friends

well m facing a different sort of issue in my cron.
i hav set job like this

30 09 * * 1 /bin/backup14M
01 14 * * 1 /bin/backup14N
20 18 * * 1 /bin/backup14E

that is for every Monday at three different times.
but, first job executes well, later ones do not. I checked my scrip result at 14:05 hrs, and it was not executed, i change the job to 14:08 and it executed well at the specified time, then checked at 18:21 hrs for the output, again it didnt execute, and i changed the time to few more minutes and it executed at that time. All i noticed is, that if i change the time to few minutes, it executes, but it do not execute for big intervals.
Can anybody tell the problem and the respective solution

Mentionable:- I hav the checked the basic cron forums, so find my issue lil different from the mentioned.. Using centOS 5.3 system.

thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: i_tears is an unknown quantity at this point 
Solved Threads: 0
i_tears i_tears is offline Offline
Newbie Poster
 
0
  #2
Oct 27th, 2009
Originally Posted by aman_dba View Post
hi friends

well m facing a different sort of issue in my cron.
i hav set job like this

30 09 * * 1 /bin/backup14M
01 14 * * 1 /bin/backup14N
20 18 * * 1 /bin/backup14E

that is for every Monday at three different times.
but, first job executes well, later ones do not. I checked my scrip result at 14:05 hrs, and it was not executed, i change the job to 14:08 and it executed well at the specified time, then checked at 18:21 hrs for the output, again it didnt execute, and i changed the time to few more minutes and it executed at that time. All i noticed is, that if i change the time to few minutes, it executes, but it do not execute for big intervals.
Can anybody tell the problem and the respective solution

Mentionable:- I hav the checked the basic cron forums, so find my issue lil different from the mentioned.. Using centOS 5.3 system.

thanks in advance
Hi

Did you check crontab logs?
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 22
Reputation: aman_dba is an unknown quantity at this point 
Solved Threads: 0
aman_dba aman_dba is offline Offline
Newbie Poster
 
0
  #3
Oct 27th, 2009
Originally Posted by i_tears View Post
Hi

Did you check crontab logs?
hey

yeah i did...its showing that its taking that script at that very interval, but the script is not executing..
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: i_tears is an unknown quantity at this point 
Solved Threads: 0
i_tears i_tears is offline Offline
Newbie Poster
 
0
  #4
Oct 27th, 2009
Originally Posted by aman_dba View Post
hey

yeah i did...its showing that its taking that script at that very interval, but the script is not executing..
Why you split your crontab into multiple lines? try this

30 9,14 * * 1 /bin/backup14M
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 22
Reputation: aman_dba is an unknown quantity at this point 
Solved Threads: 0
aman_dba aman_dba is offline Offline
Newbie Poster
 
0
  #5
Oct 27th, 2009
Originally Posted by i_tears View Post
Why you split your crontab into multiple lines? try this

30 9,14 * * 1 /bin/backup14M
i hav to run different scripts on different timings, thats why i hav split in different lines.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: i_tears is an unknown quantity at this point 
Solved Threads: 0
i_tears i_tears is offline Offline
Newbie Poster
 
0
  #6
Oct 27th, 2009
Originally Posted by aman_dba View Post
i hav to run different scripts on different timings, thats why i hav split in different lines.
hmm..

Then you need to see the output of your script while its execute. like.

01 14 * * 1 /bin/backup14N | mail -s "Your second script" i_tears@techbabu.com
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 22
Reputation: aman_dba is an unknown quantity at this point 
Solved Threads: 0
aman_dba aman_dba is offline Offline
Newbie Poster
 
0
  #7
Oct 28th, 2009
Originally Posted by i_tears View Post
hmm..

Then you need to see the output of your script while its execute. like.

01 14 * * 1 /bin/backup14N | mail -s "Your second script" i_tears@techbabu.com
well, the problem is, my sendmail is also not working. I hav checked the logs of cron, n it is simply showing that cron is taking that script, but i dunno why, i am not getting the script output.If i run script directly on the terminal, or if i set the cronjob to next few minutes, it executes very comfortably. This is wat surprising me alot...
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: i_tears is an unknown quantity at this point 
Solved Threads: 0
i_tears i_tears is offline Offline
Newbie Poster
 
0
  #8
Oct 28th, 2009
Originally Posted by aman_dba View Post
well, the problem is, my sendmail is also not working. I hav checked the logs of cron, n it is simply showing that cron is taking that script, but i dunno why, i am not getting the script output.If i run script directly on the terminal, or if i set the cronjob to next few minutes, it executes very comfortably. This is wat surprising me alot...
hmm

Which OS you are using? and how many minutes you extended?. Try to use this.

1 14 * * 1 /bin/backup14N

Remove 0 from minutes. I think problem with 01,02,03,04,05,06,07,08,09. You don't need to put 0.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 22
Reputation: aman_dba is an unknown quantity at this point 
Solved Threads: 0
aman_dba aman_dba is offline Offline
Newbie Poster
 
0
  #9
Oct 28th, 2009
Originally Posted by i_tears View Post
hmm

Which OS you are using? and how many minutes you extended?. Try to use this.

1 14 * * 1 /bin/backup14N

Remove 0 from minutes. I think problem with 01,02,03,04,05,06,07,08,09. You don't need to put 0.
M using centOS, n i believe if i use few minutes like 5 to 10 mins, the cron job is running.
By any chance, do u think that cron goes to sleep mode, after some interval of time??
and 0 is not any issue, coz i also have set jobs like
30 9 * * *
and
20 18 * * *
and they are also not executing at their intervals...
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: i_tears is an unknown quantity at this point 
Solved Threads: 0
i_tears i_tears is offline Offline
Newbie Poster
 
0
  #10
Oct 28th, 2009
Originally Posted by aman_dba View Post
M using centOS, n i believe if i use few minutes like 5 to 10 mins, the cron job is running.
By any chance, do u think that cron goes to sleep mode, after some interval of time??
and 0 is not any issue, coz i also have set jobs like
30 9 * * *
and
20 18 * * *
and they are also not executing at their intervals...
I don't think so about sleep mode.

I meant 01 not 10 or 20 or 30. I think you should try with 1,2,3,4,5,6,7,8,9 don't put 0 in single minute value.

And please send me cron logs.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC