Pathrudu Majji
Pathrudu Majji

Reputation: 77

How to disable a single WebJob under by WebApp?

I have a WebApp in Azure under which I have 10 WebJobs which runs in different schedules. Now based on business requirement, I need to stop the 2 jobs from running for next 2 weeks.

I heard that setting WEBJOBS_STOPPED = 1 in webapp appsettings, will stop all the webjobs. But I need to disable only 2 webjobs for only 2 weeks.

Is there any other Options?

I can do this by removing CRON expression from Settings.job. But I would like to know if there is any other approach in achieving this.

Upvotes: 0

Views: 982

Answers (1)

VenkateshDodda
VenkateshDodda

Reputation: 5546

Based on the above shared information, we understood that you are trying to disable a specific triggered type webjobs.

  • We don't have any Rest API or Azure CLI cmdlets to disable a triggered type web jobs.
  • If you are using continuous webjobs you can disable a particular web job using either Azure CLI cmdlets or using Rest API as mentioned in this SO thread.

Upvotes: 1

Related Questions