Reputation: 63
I am just wondering whether Azure web jobs are restarted when I restart my app service?
Upvotes: 4
Views: 2334
Reputation: 30025
When you hit the restart in azure portal, both the web app and web jobs get restarted. You can take a look at the official doc here:
Note that when you hit Restart, both the main and SCM sites get restarted.
The SCM site is where Kudu runs, including WebJobs.
You should also keep in mind that when you click Stop in the azure portal, only the main site is stopped, while the SCM site(where web jobs running) keeps running.
Upvotes: 7
Reputation: 661
Yes, if we restart the webapp, the webjob would also get restarted. If you go to Kudu console of the webapp (webappname.scm.azurewebsites.net) and click on Process Explorer you will notice that the webjob is running under the w3wp.exe_scm which is the w3wp process for the kudu site. Also, the site is running under w3wp.exe.
If you restart the webapp, process ID for both the w3wp.exe would change.
Upvotes: 2