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
 
0
  #11
Oct 28th, 2009
Originally Posted by i_tears View Post
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.
Oct 28 09:01:01 server crond[4040]: (root) CMD (run-parts /etc/cron.hourly)
Oct 28 09:30:01 server crond[4333]: (root) CMD (/bin/backup36M)

this is last log entry, and this script didnt work and i understand wat u r talking abt, but i meant to say, that if i set jobs at 18:30 hrs or 9:20 hrs, that job is also not working, so it shud not b any issue with 0 at single minutes, as other jobs are not working as well...
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
  #12
Oct 28th, 2009
Originally Posted by aman_dba View Post
Oct 28 09:01:01 server crond[4040]: (root) CMD (run-parts /etc/cron.hourly)
Oct 28 09:30:01 server crond[4333]: (root) CMD (/bin/backup36M)

this is last log entry, and this script didnt work and i understand wat u r talking abt, but i meant to say, that if i set jobs at 18:30 hrs or 9:20 hrs, that job is also not working, so it shud not b any issue with 0 at single minutes, as other jobs are not working as well...
Hmmm.

Would you please write down here your crontab entries and also tell how much time take your first script to complete its process.

You need to check your system process in that time when your second script running through crontab.
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
  #13
Oct 28th, 2009
Originally Posted by i_tears View Post
Hmmm.

Would you please write down here your crontab entries and also tell how much time take your first script to complete its process.

You need to check your system process in that time when your second script running through crontab.
entry for my crontab

30 09 * * 3 /bin/backup36M
01 14 * * 3 /bin/backup36N
20 18 * * 3 /bin/backup36E


it takes almost 40 secs to execute a script

and m sry, i don know how to check system process..if u can guide for the same as well

thanks
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
  #14
Oct 28th, 2009
Originally Posted by aman_dba View Post
entry for my crontab

30 09 * * 3 /bin/backup36M
01 14 * * 3 /bin/backup36N
20 18 * * 3 /bin/backup36E


it takes almost 40 secs to execute a script

and m sry, i don know how to check system process..if u can guide for the same as well

thanks

Hmmm.

You can see process with many ways like (top, ps) etc. Let's try to solve your problem.

create a filed like /home/checkmycron.sh. In this file paste these lines.

#!/bin/sh
stamp=`/usr/bin/date | awk '{print $4}'`
/usr/bin/mkdir /tmp/my_test_dir-$stamp

save the file and make it executable with this command.

chmod +x /home/checkmycron.sh

Make sure (date and mkdir) path. Because some time cron is not working without complete path.

The above script will create a file in /tmp/my_test_dir with time stamp. You just need to add this script in crontab like.

30 09 * * 3 /home/checkmycron.sh
01 14 * * 3 /home/checkmycron.sh
20 18 * * 3 /home/checkmycron.sh

On 18:20 check your /tmp/ directory there should be three files created. If you find 3 files with the time stamp as per your crontab then there is no problem with your crontab & we will do next step.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 26
Reputation: Cronless is an unknown quantity at this point 
Solved Threads: 2
Cronless Cronless is offline Offline
Light Poster
 
0
  #15
Oct 28th, 2009
You might also try appending "> /tmp/cronout.log" to the job to see if you get any error output from the execution. Could be a problem with the environment that the script is running in, too.
~~ Free Cron Jobs - Online Cron Service ~~
Best place to run your PHP Cron Jobs
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
  #16
Oct 29th, 2009
Originally Posted by i_tears View Post
Hmmm.

You can see process with many ways like (top, ps) etc. Let's try to solve your problem.

create a filed like /home/checkmycron.sh. In this file paste these lines.

#!/bin/sh
stamp=`/usr/bin/date | awk '{print $4}'`
/usr/bin/mkdir /tmp/my_test_dir-$stamp

save the file and make it executable with this command.

chmod +x /home/checkmycron.sh

Make sure (date and mkdir) path. Because some time cron is not working without complete path.

The above script will create a file in /tmp/my_test_dir with time stamp. You just need to add this script in crontab like.

30 09 * * 3 /home/checkmycron.sh
01 14 * * 3 /home/checkmycron.sh
20 18 * * 3 /home/checkmycron.sh

On 18:20 check your /tmp/ directory there should be three files created. If you find 3 files with the time stamp as per your crontab then there is no problem with your crontab & we will do next step.
No such files are created, not even the my_test_dir directory in /tmp directory...

I believe its case with cron only, not with script or environment..
Last edited by aman_dba; Oct 29th, 2009 at 2:11 am.
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
  #17
Oct 29th, 2009
Originally Posted by Cronless View Post
You might also try appending "> /tmp/cronout.log" to the job to see if you get any error output from the execution. Could be a problem with the environment that the script is running in, too.
I hav not got any such log file under /tmp directory, is there any other possible location for the same???
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