Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [SOLVED] 1 Minute Cron Job

    Hello Guys,

    I have a script which is kicked off by Cron once every minute. Generally speaking the script only takes a few short seconds to execute, however, on occasions where the system is under heavy load of for other issues (slow internet connection) the script will take more than 60 seconds to execute.

    Now, is there a risk that I could end up with two instances of the script running at the same time? or is cron smart enough to not let that happen?

    I can build safe guards into my script to stop it happening I just wanted to be sure that it was worth me putting the work in if cron doesn't protect me against this anyway.

    I'd appreciate your thoughts,


  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Behind You!
    No, cron will do whats its programmed to do, it will run the second instace of the script, and you will have to put the work on your script.

  3. #3
    Thanks for that my man, I'll factoring a failsafe on my script.


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts