Skip to content

Commit 046a937

Browse files
committed
document optional usage of seconds
1 parent eae41f2 commit 046a937

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ time dow dom month
1515

1616
Where:
1717

18-
- `time`: Time range in 24-hour format (HH:MM-HH:MM) or * for all day
18+
- `time`: Time range in 24-hour format (HH:MM[:SS]-HH:MM[:SS]) or * for all day. Seconds are optional.
1919
- `dow`: Day of week (0-6, where 0=Sunday)
2020
- `dom`: Day of month (1-31)
2121
- `month`: Month (1-12)
@@ -36,6 +36,7 @@ Each field (except time) supports:
3636
```
3737
# Basic patterns
3838
17:20-21:35 1-5 * * # Weekdays from 5:20 PM to 9:35 PM
39+
17:20:15-21:35:16 1-5 * * # Weekdays from 5:20:15 PM to 9:35:16 PM
3940
* 0,6 * * # All day on weekends
4041
09:00-17:00 1-5 * 4-9 # Weekdays 9 AM to 5 PM, April through September
4142
12:00-13:00 * 1,15 * # Noon-1 PM on 1st and 15th of every month

cronrange.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Format: `time dow dom month`
66
//
77
// Where:
8-
// - time: Time range in 24h format (HH:MM-HH:MM) or * for all day
8+
// - time: Time range in 24h format (HH:MM[:SS]-HH:MM[:SS]) or * for all day
99
// - dow: Day of week (0-6, where 0=Sunday)
1010
// - dom: Day of month (1-31)
1111
// - month: Month (1-12)
@@ -16,6 +16,7 @@
1616
// Examples:
1717
//
1818
// 17:20-21:35 1-5 * * # Weekdays from 5:20 PM to 9:35 PM
19+
// 11:20:12-19:25:18 1-5 * * # Weekdays from 11:20:12 AM to 7:35:18 PM
1920
// * 0,6 * * # All day on weekends
2021
// 09:00-17:00 1-5 * 4-9 # Weekdays 9 AM to 5 PM, April through September
2122
// 12:00-13:00 * 1,15 * # Noon-1 PM on 1st and 15th of every month

0 commit comments

Comments
 (0)