none
Restart the WebJob RRS feed

  • Question


  • I have a WebJob inside a WebApp. In the portal, there is facility to do advance restart of WebApp, but this does not restart the WebJob.

    How can I Advance Restart the WebJobs?

    Monday, September 16, 2019 12:38 PM

All replies

  • Try using portal.azure.com, nativigate to your webapp -> webjobs.   Then right click the continuous webjob and stop/start.

    Suwatch

    Monday, September 16, 2019 5:16 PM
  • Thank you for your reply.

    I got the method you stated  to restart the webjob. But I will not be able to perform instance wise restart using the method listed above.

    I want to avoid the downtime, when restarting the WebJob. Can you please suggest any other option/ method?

    Tuesday, September 17, 2019 10:06 AM
  • More like a hack, but you could add a dummy appSettings.   This will cause app and webjob restart across instances with minimal downtime.

    Suwatch

    Tuesday, September 17, 2019 6:09 PM
  • I will do restart rather than applying a hack and add dummy appSettings. It will restart all instances of my webjob at once.

    Is it possible to instance wise restart of WebJob. If yes, please suggest a suitable solution.

    Thursday, September 19, 2019 9:49 AM
  • Can you provide more detail about what type of webjob you are using? Is it continuous or triggered? Are you trying to automate it or is manual OK?

    Saturday, September 21, 2019 2:19 AM
  • I have multiple WebApps and WebJobs, working altogether and dependent on each other. When I update any WebApp then I need to restart the dependent WebJobs.

    So I want a way to advance restart those WebJobs to avoid downtime.


    My webJobs are of continuous type. The provision & deployment of these WebJobs are automated using PowerShell scripts.

    Now, I am giving a patch on any of the WebApp, so I need to restart (advance restart, without downtime) the dependent WebJobs.

    • Edited by Raven Peaks Monday, September 23, 2019 9:58 AM
    Monday, September 23, 2019 9:45 AM
  • Kudu now supports selecting the specific instance. You can then go into process explorer and kill the webjob. Then that specific webjob will automatically restart as long as its continuous. 

    You should also be able to do this via the Azure portal -> Web app - > process explorer. If you kill the Kudu (scm) process that will cause all the webjobs on that instance to restart since webjobs run as child processes of Kudu.

    Monday, September 23, 2019 4:14 PM