Azure WebRole's scheduled task every morning

I am trying to find a solution to get WebRole to run a task every morning at 5am. I looked at Quartz.Net and examples on stackoverflow, but they all plan to run the task every 10 minutes. Are there any examples showing how I can plan it?

+1
source share
2 answers

Quartz.Net should be good for you. Use CronTrigger (or CronTriggerImpl in version 2.x).

An example cron expression is "0 0 5 * * ?" - run every day at 5 AM .

Cron trigger sub-expression position value:

  • Seconds - 0 for you (run in 0 seconds)
  • Minutes - 0 for you (run in 0 minutes)
  • Hours - 5 for you (performed after 5 hours, 24-hour hours are used)
  • Day of the month - * - run every day
  • Month - * for you (runs every month)
  • Day of the week - ? - not specified for you (Day of the month is used instead)
  • Year (optional field) - not used
+1
source

You can also check the Scheduler add-on in the Windows Azure Store (log in to the portal on manage.windowsazure.com, go to add-ons, then click Application Services and select Scheduler).

Up to 5000 scheduled tasks / month are free.

+2
source

All Articles