Can I easily stop / start Azure Webjobs without going through an interface or FTP?

The Azure management interface is desperately slowing down the loading of a list of web tasks, and the new portal simply shuts down and does not complete 95% of the time.

We have many WebApps (often deployed for each region) in Azure that do web jobs. It is extremely cumbersome and slow to go through the user interface to do all this.

I know that the Kudu API offers start / stop mechanisms for web tasks, and you can simply drop the file named “disable.job” in the tasks folder to stop it, but all this requires going through an extremely annoyingly slow user interface data ($ username, password).

Is there a PowerShell cmdlet that I somehow missed, or a public script to help do this? Ideally, I just want to provide my Azure credentials or import certificates.

(Honestly, it's pretty surprising that Microsoft Key Cloud / DevOps will be almost completely UI dependent, and on an extremely slow / useless interface.)

+4
source share
3 answers

It’s hard to find, but here is a link to the documentation for Start and Stop:

Start: Documentation

Example: Start-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob -JobType Continuous

Stop: documentation

Example: Stop-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob

+10
source

Al Muhandis

In fact, there is a Rest API that lets you pilot your web jobs.

, , , ,..

: https://github.com/projectkudu/kudu/wiki/WebJobs-API

+5

Open your web work resource at https://resources.azure.com . It should be something like https://resources.azure.com/subscriptions/<your subscription>/resourceGroups/<your group>/providers/Microsoft.Web/sites/<your site name>/continuouswebjobs/<your job name>and open the Powershell tab. There should be updated samples on how to start / stop WebJob:

# Action start
Invoke-AzureRmResourceAction -ResourceGroupName <your groupname> '
       -ResourceType Microsoft.Web/sites/continuouswebjobs '
       -ResourceName <your site name>/<your job> '
       -Action start  -ApiVersion 2018-02-01 -Force
0
source

Source: https://habr.com/ru/post/1611626/


All Articles