6

Say you configure a cron job to run every minute to do something. What will happen if the actual task runs longer than a minute? Will cron create another job instance/thread? Or will cron wait and make sure the previous run is complete?

Thanks!

1 Answers1

2

You must handle that scenario, not sure linux will handle it gracefully. By adding a simple check before running your task that the task is not already running. If you don't do that, hell will probably break loose on your server.

This post will help you Run cron job only if it isn't already running

Community
  • 1
  • 1
legrandviking
  • 2,348
  • 1
  • 22
  • 29