Skip to content

Commit

Permalink
Clarify hash/module extension, only vs dow field
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Mar 3, 2024
1 parent 79e29a5 commit 748ad56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ p Fugit.parse_cron('59 6 1-7& * 2&').next_time('2020-03-15').to_s

Fugit understands `0 5 * * 1#1` or `0 5 * * mon#1` as "each first Monday of the month, at 05:00".

The hash extension can only be used in the day-of-week field.

```ruby
'0 5 * * 1#1' #
'0 5 * * mon#1' # the first Monday of the month at 05:00
Expand All @@ -273,6 +275,8 @@ Fugit understands `0 5 * * 1#1` or `0 5 * * mon#1` as "each first Monday of the

Fugit, since 1.1.10, also understands cron strings like "`9 0 * * sun%2`" which can be read as "every other Sunday at 9am".

The modulo extension can only be used in the day-of-week field.

For odd Sundays, one can write `9 0 * * sun%2+1`.

It can be combined, as in `9 0 * * sun%2,tue%3+2`
Expand Down

0 comments on commit 748ad56

Please sign in to comment.