4

I have a Azure web job that is scheduled to run every 5 minutes using the cron expression in the settings.job file. If the process doesn't finish within 5 minutes will Azure kick off another instance of the job or will it wait until the first one finishes?

I would like to make sure it waits until the first one finishes so it isn't running multiple instances.

Austin
  • 4,638
  • 7
  • 41
  • 60

1 Answers1

7

When a scheduled webjob is started, Azure places a lock file. This lock file will remain until the scheduled webjob is completed. If there's an attempt to fire up another scheduled job, you'll get a ConflictException.

You can read about the lock file here. And the code that checks to see if another job is already running is here.

Rob Reagan
  • 7,313
  • 3
  • 20
  • 49