Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My crontab runs a cron every 5 minutes... If the cron needs more than 5 minutes to run, can this be a problem?? Can the problem be with the commands the cron runs?

Thanks for your answer ;-)

share|improve this question
add comment

1 Answer

cron should have no problem running your task again even though the first one isn't finished.

Although, a problem could arise depending on the commands you are running (i.e. if they both write to the same file)

share|improve this answer
    
If having two instances of the script running concurrently is an issue, you want to use a lockfile - or things like pgrep to check if another instance is running - to either make the second instance wait or quit, if it detects another instance is running. –  ultrasawblade Sep 5 '12 at 11:03
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.