Search code examples
azureazure-devopsazure-webjobs

Trigger azure Webjob from powershell / azure devops


Is there any idea that shows how to trigger (or start) a azure web app webjob from azure devops task ( or via azure powershell) ?

Thank you,

Edit : i use the azure cli task in azure devops it's look no working

EDIT 2 : i'am wrong in name of slot the solution of @levi-lu-msft Works


Solution

  • You can use the extension task Azure App Services (With WebJob) - Start and Stop to start a azure web app webjob.

    You can also run below ac cli command in the azure cli task to start a webjob.

    az webapp webjob triggered run --name MyWebApp --resource-group MyResourceGroup --webjob-name MyWebjob

    You will need to connect your azure devops to Azure subscription by creating an Azure Resource Manager service connection