Does Azure start up another instance of a scheduled web job if it is already running?

[亡魂溺海] 提交于 2019-12-10 09:02:24

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/43373953/does-azure-start-up-another-instance-of-a-scheduled-web-job-if-it-is-already-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!