![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| crontab jobs to append to the same log | ericaworld | Shell Programming and Scripting | 2 | 07-11-2007 09:40 AM |
| Start time/end time and status of crontab job | thambi | Shell Programming and Scripting | 3 | 05-16-2007 07:24 AM |
| Crontab did not fire jobs | hwh1 | UNIX for Advanced & Expert Users | 4 | 10-03-2006 09:41 PM |
| Executing in crontab | big123456 | UNIX for Advanced & Expert Users | 2 | 09-19-2006 09:17 PM |
| Problem with executing a script scheduled in crontab | Amardeep | Shell Programming and Scripting | 4 | 07-06-2006 09:51 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Overlapping(executing time) jobs in crontab
I do not have the luxery of a server that i can try on, so i had to post my qn here.
Say i have two jobs in the cron table, the jobs are scheduled 2 mins apart. Assuming the first jobs does a lot of operations and takes > 2 mins. Will the second job be executed? Will Unix actually have a queue of the cron jobs? If there are subsequent jobs after the second job, what heppens? They will be pushed back? Last edited by new2ss; 02-14-2006 at 07:16 PM. Reason: for clarity in questin |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Your second job and subsequent job will be executed irrespective of the first job has been completed or not.
Infact you can have the two crons being executed at the same time, that of course would depend when you want to run those scripts. If you don't want the second script to execute if the 1st cron has not completed yet, use the concept of a lock file which can be found in various posts on this site. Rahul. |
|
#3
|
|||
|
|||
|
Thanks for the explanation Rahul.
|
|
#4
|
||||
|
||||
|
This is true for two cron jobs, but probably not two hundred. Most versions of cron have an overall limit and when that limit is reached, cron will not run more jobs. Jobs are then deferred and entered into a fifo list. Once a minute cron will retry to see if it can run the jobs. See man queuedefs.
|
||||
| Google The UNIX and Linux Forums |