-1

I have a question in cron jobs where i create a job to run a page every one minute.

If this page didn't finish its job completely (not executed completely) in this minute, then

  1. will the cron job command run this page again from the beginning?
  2. or will it run this page again but will allow the first to complete?
  3. or will it wait for the page to complete and do the command?
  4. or will it do some thing else????
Anshul Goyal
  • 61,070
  • 31
  • 133
  • 163
Eng Hany Atwa
  • 293
  • 2
  • 5
  • 11

1 Answers1

0

Every cron job is run independently in a separate sub process, so the cron job will run irrespective of whether some other job is running or not.

Hence, if your script is taking more than one minute to run, and you have scheduled it to run every minute, it will have unintended consequences because two process, or n+1 process for script execution time in range [n, n+1) minutes, will now be running in different execution stage. This will be true for any overlaps in execution time of cron jobs.

Anshul Goyal
  • 61,070
  • 31
  • 133
  • 163