0

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

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

thanks can you tell me how to mention CRON Expression or Schedule in above code
@GauravMoolani You could include a settings.job file at the root of your WebJob .zip file, see this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.