Azure的WebRole计划任务,每天早上 [英] Azure WebRole Scheduled Task Every Morning

查看:132
本文介绍了Azure的WebRole计划任务,每天早上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出解决的办法得到一个WebRole每天早上早上5点运行任务。我已经看过Quartz.Net和计算器,但所有这些例子预定任务每10分钟运行。有没有表现出任何的例子我该怎么安排呢?

I am trying to figure out a solution to getting a WebRole to run a Task every morning at 5AM. I have looked at Quartz.Net and the examples on stackoverflow but all of them schedule the task to run every 10 minutes. Are there any examples that show how I can schedule it?

推荐答案

Quartz.Net应该是很好的you.Try使用的 CronTrigger (或 CronTriggerImpl在 2.x版)。

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

的cron-EX pression的例子 - 0 0 5 * *? - 每天早上5点运行

Example of cron-expression - "0 0 5 * * ?" - run every day at 5 AM.

触发克龙子前pression位置意思是:

Cron trigger sub-expression position meaning:


  1. - 0 你(在0跑秒)

  2. - 0 你(在0分钟内)

  3. 小时 - 5 为你(在5个小时的运行; 它采用24小时制的)

  4. 某一天的月 - * - 天天跑

  5. - * 你(运行每月)

  6. 某一天的周 - ? - 你(某一天的一个月时间已代替)
  7. 没有指定
  8. (可选字段) - 的不使用

  1. Seconds - 0 for you (run at 0 second)
  2. Minutes - 0 for you (run at 0 minutes)
  3. Hours - 5 for you (run at 5 hour; it uses 24-hour clock)
  4. Day-of-Month - * - run every day
  5. Month - * for you (run every month)
  6. Day-of-Week - ? - not specified for you (Day-of-Month has been used instead)
  7. Year (optional field) - not used

这篇关于Azure的WebRole计划任务,每天早上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆