5
votes

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.

3
Azure Storage (queues, blobs, tables) have integration with the WebJobs SDK as triggers (triggers for doing some work against a new value in a table store for example). Therefore I think your reference to queues is specifically related to the WebJobs SDK, which is just one way of running WebJobs. The other way is manually via the WebJobs link under each Azure Website.Matthew

3 Answers

7
votes

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

4
votes

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

0
votes

The easiest way to schedule a job is to use a TimerTrigger on the WebJob method you'd like to execute on a schedule.