3

Here in wiki

http://en.wikipedia.org/wiki/CRON_expression#CRON_expression

under subheading "Predefined scheduling definitions"

Its mentioned that "day of week (0 - 7) (0 or 7 are Sunday, or use names)"

its referring 0 or 7 as Sunday

and under subheading "CRON expression"

its referring "the last Friday" ("5L") of a given month. In the day-of-month field,

but the Quartz Documentation

here http://quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger

Contradicts things its saying

"Day of week 1-7 or SUN-SAT" (its not from 0-7 as mentioned in wiki)

and in the Special Characters subheading

its referring "6L" means "the last friday of the month" (In wiki its 5L)

So my question is

  1. Which one is correct ?
  2. Are both of these are correct in their own context ? (meaning quartz for only quartz and in wiki for unix based os)
4

1 回答 1

4

是的,两者都是正确的。维基百科文章提到了在 Unix 及其衍生产品中实现的 cron。

Quartz 调度器有它自己的“类似 cron”的实现,但并不完全兼容。

我会在您的表达式中使用星期几的名称以避免任何混淆。

于 2013-04-18T10:56:46.017 回答