Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't schedule azure webjob

Tags:

I'm not being able to publish a scheduled WebJob to Azure App Service. I'm using Visual Studio 2017.

With this settings all works fine:

{ "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json", "webJobName": "WebJobName", "runMode": "OnDemand" }

But when I set this settings:

{ "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json", "webJobName": "WebJobName", "startTime": "2017-03-17T07:00:00+00:00", "endTime": "2027-03-17T07:00:00+00:00", "jobRecurrenceFrequency": "Day", "interval": 1, "runMode": "Scheduled" }

Visual Studio 2017 crashes at the "Creating the scheduler job" step.

I can't find how to schedule this job, I'm using the package Microsoft.Web.WebJobs.Publish 1.0.13

Can anyone help me?

Thanks

like image 734
Asier Peña Avatar asked Mar 16 '17 18:03

Asier Peña


1 Answers

The feature where VS configures the Azure Scheduler has many issues, and is on the way to deprecation. Instead, the suggested approach is to rely on the CRON feature described here.

As an aside, if you want to get the scheduler working and not move to CRON, one thing you should do is upgrade to the latest version on the WebJobs NuGet package, which should solve this particular issue.

like image 66
David Ebbo Avatar answered Sep 22 '22 11:09

David Ebbo