| | |
cron job not running for big time intervals
![]() |
•
•
Join Date: Mar 2009
Posts: 22
Reputation:
Solved Threads: 0
0
#11 Oct 28th, 2009
•
•
•
•
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: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...
•
•
Join Date: Oct 2009
Posts: 12
Reputation:
Solved Threads: 0
0
#12 Oct 28th, 2009
•
•
•
•
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...
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.
•
•
Join Date: Mar 2009
Posts: 22
Reputation:
Solved Threads: 0
0
#13 Oct 28th, 2009
•
•
•
•
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.
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
•
•
Join Date: Oct 2009
Posts: 12
Reputation:
Solved Threads: 0
0
#14 Oct 28th, 2009
•
•
•
•
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-$stampsave 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.
•
•
Join Date: Sep 2009
Posts: 26
Reputation:
Solved Threads: 2
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.
•
•
Join Date: Mar 2009
Posts: 22
Reputation:
Solved Threads: 0
0
#16 Oct 29th, 2009
•
•
•
•
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.
I believe its case with cron only, not with script or environment..
Last edited by aman_dba; Oct 29th, 2009 at 2:11 am.
•
•
Join Date: Mar 2009
Posts: 22
Reputation:
Solved Threads: 0
0
#17 Oct 29th, 2009
I hav not got any such log file under /tmp directory, is there any other possible location for the same???
![]() |
Similar Threads
- Cron job problem (PHP)
- Cron job woes with Carp (PHP)
- Cron Job to back up directories (PHP)
- need help w/ CRON job for backups (*nix Software)
Other Threads in the *nix Software Forum
- Previous Thread: Setting crontab to pull database
- Next Thread: Remote Desktop to Ubuntu from a Windows XP PC
| Thread Tools | Search this Thread |





