rufus scheduler第一天几个月

rufus scheduler first day months

我尝试在每个月的第一天执行一个 cron。

我在每个第一个星期一看到如何,但在第一天没有。

scheduler.cron('00 12 * * mon#1') do
     # ...
end

我试试:

scheduler.cron('00 12 * * #1') do
  # ...
end

我该怎么做?

格式为:

┌───────────── min (0 - 59)
│ ┌────────────── hour (0 - 23)
│ │ ┌─────────────── day of month (1 - 31)
│ │ │ ┌──────────────── month (1 - 12)
│ │ │ │ ┌───────────────── day of week (0 - 6)
│ │ │ │ │
* * * * *

"0 12 1 * *"

参考:https://en.wikipedia.org/wiki/Cron#Configuration_file