Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Azure WebJob without queue

Is there a way to schedule a job without having listen to the queue? I mean I would like to run it every hour or so and do something, regardless of the queue. Does that even make sense? One solution I can think of is to queue a message to itself each time the job is done, but that doesn't look like a clean solution to me.

like image 403
Alkasai Avatar asked Jun 26 '14 18:06

Alkasai


People also ask

Is Azure WebJobs deprecated?

Azure WebJobs are deprecated, but still in use. They are being phased out in favor of Azure Functions. Azure Functions is a more up-to-date and feature rich service which offers a greater degree of flexibility and control.

When would you use a WebJob?

You can use the WebJobs feature of App Service to run a script or code in the context of an App Service web app. The WebJobs SDK is a framework designed for WebJobs that simplifies the code you write to respond to events in Azure services.


2 Answers

Create a scheduled job with a 1 hour frequency and use Host.Call to invoke the function. See the ManualTrigger function in this code sample

like image 179
Victor Hurdugaci Avatar answered Sep 29 '22 05:09

Victor Hurdugaci


Of course, no need to listen to a queue. Check the WebJobs documentation on how to schedule a job: http://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/#CreateScheduled

like image 23
CSharpRocks Avatar answered Sep 29 '22 04:09

CSharpRocks