Gaurav Moolani
Gaurav Moolani

Reputation: 362

Triggered Web Job Powershell Deployment script

I have a powershell script to deploy continues webjob. as shown below

`$Header = @{
'Content-Disposition'='attachment; attachment; filename=Copy.zip'
'Authorization'=$accessToken}

$apiUrl1 = "https://$webAppName.scm.azurewebsites.net/api/continuouswebjobs/MyWebJob" 

Invoke-RestMethod -Uri $apiUrl1 -Headers $Header -Method put -InFile "$zipFilesPath\MyWebJob.zip" - 
ContentType 'application/zip'`

I need same kind of script to deploy triggered webjobs. Please help

Upvotes: 0

Views: 214

Answers (1)

Joy Wang
Joy Wang

Reputation: 42063

To deploy triggered webjobs, just change the $apiUrl1 in your script like below.

$apiUrl1 = "https://$webAppName.scm.azurewebsites.net/api/triggeredwebjobs/MyWebJob" 

Reference - Upload a triggered job as zip

Upvotes: 1

Related Questions