I have an continuous webjob that is supposed to run until I stop it. I rely on this condition, but for some reason this phenomena happens to me:
[01/19/2021 09:57:51 > 44ab83: SYS INFO] Detected WebJob file/s were updated, refreshing WebJob
[01/19/2021 09:57:51 > 44ab83: SYS INFO] Status changed to Stopping
[01/19/2021 09:57:56 > 44ab83: ERR ] Thread was being aborted.
[01/19/2021 09:57:57 > 44ab83: SYS INFO] WebJob process was aborted
[01/19/2021 09:57:57 > 44ab83: SYS INFO] Status changed to Stopped
The code didn't throw any error so I'm wondering why is the webjob restarting on its own.
What does Detected WebJob file/s were updated, refreshing WebJob
mean?
I'm not creating/writing any files inside the WebJob's directory.
Troubleshooting automatic restart/refresh of Azure Web Jobs
Reason 1:
Due to website shutdown/restart
Reason 2:
Due to changes in the azure web job directory files or file content (`D:\home\site\wwwroot\app_data\jobs\continuous\<WebJobName>`)
Reason 3:
Due to a web app and/or web job deployment
Reason 4:
Due to an azure outage or maintenance
For more details, you can refer to this blog.
Link: https://www.cryingcloud.com/blog/2016/11/02/troubleshooting-automatic-restart-of-azure-web-jobs
Raise a support ticket, let Microsoft help you check logs.