Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Will cron run a job that is currently running?

Say you had a cron job that ran every hour and one time the job was not completed when the next hour came around. Is it the responsibility of the job being run to make sure only one instance is running or does cron handle this?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Yes it is the responsability of the job being executed to make sure it is the only instance of itself being executed (if it is necessary). You could do that using some kind of lock file or maybe just using ps...

share|improve this answer

Cron will run the job regardless of what other crons have done or what else may be running.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.