Bosses
Bosses

Reputation: 29

rufus scheduler first day months

I try to execute a cron every first day of the month.

I see how do on every first monday but no on first day.

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

I try with:

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

how I can do it?

Upvotes: 1

Views: 681

Answers (1)

J. da Silva
J. da Silva

Reputation: 89

The format is:

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

"0 12 1 * *"

Reference: https://en.wikipedia.org/wiki/Cron#Configuration_file

Upvotes: 2

Related Questions