Monday, June 19, 2017

Scheduled web jobs using CRON

On Internet We can find plenty of articles around how to create scheduled Web Jobs. I followed Microsoft's Documentation and added Web job to an existing web application. When I published the web app from Visual Studio a folder got created in to the App_Data folder of the web app, a scheduler job collection got created in Azure and web job schedule for the job. It worked fine for some time.
But recently I faced some issue with publishing web job from Visual studio and the error was like this "Microsoft.Web.WebJobs.Publish.1.0.12\tools\webjobs.console.targets(110,5): Error : An error occurred while creating the WebJob schedule". I did lot of searching on internet but couldn't find any solution and raised a ticket with Microsoft support. Microsoft suggested to Use CRON expression for scheduling the job instead for scheduler job collection. This approach really very helpful and since then We haven't faced any issues related to schedule and publishing of the web app.
I found the CRON expression better. Hope this will help.

No comments:

Post a Comment