The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-14-2006
Registered User
 

Join Date: Jan 2006
Posts: 126
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
Reply With Quote
Forum Sponsor
  #2  
Old 02-15-2006
Registered User
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 156
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.
Reply With Quote
  #3  
Old 02-16-2006
Registered User
 

Join Date: Jan 2006
Posts: 126
Thanks for the explanation Rahul.
Reply With Quote
  #4  
Old 02-16-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,656
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0