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?

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.

Thanks for the explanation Rahul.

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.