Stop an Azure WebJob

After a couple of failures due to Azure WebJobs not stopping when I thought they were going to, I figured out the only fail safe (?) option that will stop both Triggered and Continuous WebJobs. Not just that: It’s dead easy!

You can try to stop the App Service itself, but for some reason that does not apply to the WebJobs, and God only knows why. Stopping an individual Continuous WebJob can be done from the Azure Portal, but what about stopping multiple WebJobs including a Triggered one? I’ve even experienced that deleting a WebJob didn’t stop it, I’ve actually seen that multiple times.

To stop all WebJobs, both Triggered and Continuous, add WEBJOBS_STOPPED with the value 1 via “Configuration” / “Application settings” in the Azure Portal. As far as I’m concerned this has worked beautifully every time I’ve tried it.

Leave a Reply

Your email address will not be published. Required fields are marked *