Azure-webjobs-sdk: Publishing a new WebJob sets it as 'On Demand'

Created on 16 Dec 2015  路  7Comments  路  Source: Azure/azure-webjobs-sdk

Heya :)

When I first publish my webjob to the azure website/portal, it lists the webjob as 'On Demand'.

image

I then have to _manually_ right click and select RUN NOW. (which, by the way .. took me _ages_ to figure out! Not very discoverable :crying_cat_face: )

Anyways, that works and my webjob runs.. but.. can this be programmatic?

Most helpful comment

AHH!

So this also means I can manually change my settings.. lets see..

Yep! looking at \Properties\webjob-publish-settings.json i can see: "runMode": "OnDemand". Changing that to "runMode": "Continuous" will fix up my problem :)

Thank you @mathewc for your kind patience :+1:

All 7 comments

Yes the right click menu is TOTALLY not discoverable. Sigh. I thought you were using the WebJobs SDK, TimerTrigger, etc.? Those jobs should be published as Continuous (which is an option in the VS tooling). Please confirm what type of job you have here.

There are ways to invoke a job programmatically.

I thought you were using the WebJobs SDK, TimerTrigger, etc.?

Correct.

Those jobs should be published as Continuous.

Kewl! This was what I thought, too.

(which is an option in the VS tooling)

Er.... I don't remember seeing _anything_ like this, in the VS Tooling? Here's a screen shot...

image

image

In the VS dialog that came up when you chose "Publish as an Azure WebJob" there is a dropdown for "WebJob run mode" that defaults to "Continuously". That's what you want. Looks like you changed it to "On Demand".

there is a dropdown for "WebJob run mode" that defaults to "Continuously".

Nope. not there :( Is there a newer 'tooling' that is needed?

can this be defined programatically instead of relying on the tooling ?

image

image

image

I'm talking about the tooling flow shown here: https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/

That post shows the "WebJob Run Mode" dropdown.

AHH!

So this also means I can manually change my settings.. lets see..

Yep! looking at \Properties\webjob-publish-settings.json i can see: "runMode": "OnDemand". Changing that to "runMode": "Continuous" will fix up my problem :)

Thank you @mathewc for your kind patience :+1:

Looks like you can get this window to come back up by deleting the webjob-publish-settings.json file as well as the PublishProfiles folder from the project. Then the next time you right-click on the project and choose to Publish as Azure WebJob, you'll get the window you're looking for.

Was this page helpful?
0 / 5 - 0 ratings