Can I easily stop/start Azure Webjobs without going through the UI or FTP?

爱⌒轻易说出口 提交于 2019-11-30 09:56:08
Brian Sherwin

It's hard to find, but here's 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

Al Muhandis,

Actually there is a Rest API that allows to pilot your web jobs.

It allows to list jobs, get a job detail, delete or upoad a job, and some few more,..

Have a look at : https://github.com/projectkudu/kudu/wiki/WebJobs-API

Regards

Open your resource, web job at https://resources.azure.com. 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 Powershell tab. There should be up to date samples on how to start / stop a 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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!