Overlapping(executing time) jobs in crontab


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Overlapping(executing time) jobs in crontab
# 1  
Old 02-14-2006
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 10:16 PM.. Reason: for clarity in questin
# 2  
Old 02-15-2006
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  
Old 02-17-2006
Thanks for the explanation Rahul.
# 4  
Old 02-17-2006
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab jobs excuting

Hi i want to run the cronjob from 7 Am till 11.30Am for every 5 minutes from monday to friday. can anyone help? (15 Replies)
Discussion started by: satheesh_charle
15 Replies

2. Shell Programming and Scripting

Crontab jobs log

hi gurus, I have scheduled some script by using crontab. I would like to save all the logs in some particular directory whenever the jobs are running. please let me know how i need to code it to save the logs files. (2 Replies)
Discussion started by: arun888
2 Replies

3. Shell Programming and Scripting

Identify the overlapping and non overlapping regions

file1 chr pos1 pos2 pos3 pos4 1)chr1 1000 2000 3000 4000 2)chr1 1380 1480 6800 7800 3)chr1 6700 7700 1200 2200 4)chr2 8500 9500 5670 6670 file2 chr pos1 pos2 pos3 pos4 1)chr2 8500 9500 5000 6000 2)chr1 6700 7700 1200 2200 3)chr1 1380 1480 6700 7700 4)chr1 1000 2000 4900 5900 I... (2 Replies)
Discussion started by: data_miner
2 Replies

4. UNIX for Dummies Questions & Answers

Cron Jobs Not Executing

Hi Guys, Good day! I don't know what's the problem with this, I have two (2) entries in Crontab, these 2 entries are scripts which I've created. I need these 2 for automatic backup and maintaining only 3 files under a given directory. Here are my entries below, and they are NOT executing: 00... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

5. Shell Programming and Scripting

waiting on jobs in bash, allowing limited parallel jobs at one time, and then for all to finish

Hello, I am running GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu). I have a specific question pertaining to waiting on jobs run in sub-shells, based on the max number of parallel processes I want to allow, and then wait... (1 Reply)
Discussion started by: srao
1 Replies

6. UNIX for Dummies Questions & Answers

How to start jobs manually from Crontab

Hello - I have about 7 jobs listed in my crontab. They run automatically everyday. However I am wondering how to start them manually? My system is SunOS 5.10 Jobs are listed in this fashion: 41 00 * * 1-5 /system/volms/.vbc/startmeup 01 44 * * 0-6 /system/volms/.vbc/kill (space)... (7 Replies)
Discussion started by: DallasT
7 Replies

7. UNIX for Dummies Questions & Answers

Re : Set multiple cron jobs in one crontab file

Hello All, Hopw all is fine. I am newbie to Unix. I am using Bourne Shell (sh). One of the question I have is that I am trying to read XML file and based on reading that XML file I want to run different java programs at different hours. Meaning 05 14 * * * java ./program1 10 14 * * * java... (3 Replies)
Discussion started by: samshaw
3 Replies

8. Shell Programming and Scripting

crontab jobs to append to the same log

Hi, all: I have a shell script runs in the crontab, which writes the output to a log file, as following: 0 18 * * * /oracle/deleteBackup.sh >/oracle/deleteBackup.log Everytime the script is run by crontab , the deleteBackup.log is overwritten, is there anyway that I can append to the... (2 Replies)
Discussion started by: ericaworld
2 Replies

9. UNIX for Advanced & Expert Users

Crontab did not fire jobs

Hello, I have something weird that I need some solution and hope that you can help out there :). I have crontab entry and it is running everyday. Sometimes, the crontab will just hang/stale where my jobs will not be executed(of course, the user complaint, then only I know). I will need to do:... (4 Replies)
Discussion started by: hwh1
4 Replies
Login or Register to Ask a Question