0
votes

I have a scheduled web job, and a web app. The web app has 3 total deployment slots (including production). My question is, do scheduled azure web jobs run even when the slot isn't swapped to "prod"? I'm seeing in my database that the page that the job's hitting seems to be called 3 times but my understanding was nonprod webjobs didn't run.

The webjob itself is very simple. it's just a powershell script that calls a webpage using the below format:

$progressPreference = "silentlyContinue"
$result = Invoke-WebRequest -Uri "http://hithere.com" 
-Method Get -UseBasicParsing;

Thanks to every for your help!

2
There are two ways to schedule WebJobs: Azure Scheduler & CRON, as described here. Can you clarify your question so it says what you are using?David Ebbo

2 Answers

1
votes

my understanding was nonprod webjobs didn't run.

In fact, each slot is in itself a regular Azure Web App, it will have its own app settings, connection string, WebJob and any other configuration. The WebJob will be executed if it meets the scheduled condition, it has nothing to do with whether it is prod. More detail info about slot please refer to blog.

1
votes

If all deployment slot is working concurrently .Then Web job also work in every deployment slot.