Unable to stop the continuous webJob deployed from Azure-DevOps

Sheethal Pai 26 Reputation points
2023-01-04T04:30:38.103+00:00

The continuous Web-Job deployed from Azure-DevOps runs successfully but on trying to stop the web-Job fails with error: Failed to stop the Web-Job.

Checked the Kudo console - disable.job is absent since the start. Unable to even manually place the file.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,807 questions
0 comments No comments
{count} vote

Accepted answer
  1. VenkateshDodda-MSFT 21,226 Reputation points Microsoft Employee
    2023-01-04T08:40:48.16+00:00

    @Sheethal Pai Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    As mentioned in this documentation, it looks like you are running the webjob under the default location of d:\home\site\wwwroot\app_data\jobs... and using Run-From-Package. The start\stop mechanism requires write access to add the disable.job for stopping a continuous WebJob and deleting it when starting it. This will not succeed when the location is read-only.

    Just want to check whether web Jobs that were deployed through azure DeVops were you able to see them under web Jobs section in the azure portal of your web app. If yes, you can add any of the below app setting to stop the webjob.

    • WEBJOBS_STOPPED - Set this setting to 1 to disable running any job (will also stop all currently running jobs).
    • WEBJOBS_DISABLE_SCHEDULE - Set this to 1 to turn off all scheduled triggering. Unlike with WEBJOBS_STOPPED, Web Jobs can still be manually invoked.

    Refer to this GitHub documentation from more information.

    Alternatively, you can use the Invoke-AzResourceAction (this documentation is using Invoke-AzureRMResouceAction use Az cmdlets instead of AzureRM cmdlets) or Web Apps - Stop Continuous Web Job REST API to stop the webjob.

    Feel free to reach out to me if you have any further questions on this.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Amelia S 6 Reputation points
    2023-01-04T08:54:11.577+00:00

    Login in to your azure account with proper credentials.
    Go to app services and click on a particular app service that you want to select.
    Go to web jobs.
    Click on the web job which is in running status and right-click on it.
    Select stop and which will stop the web job.

    Greetings!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.