mirror of
https://github.com/PerMalmberg/libcron.git
synced 2025-04-23 00:43:00 -05:00
Compare commits
No commits in common. "master" and "v1.3.1" have entirely different histories.
@ -188,16 +188,11 @@ the '?'-character to ensure that it is not possible to specify a statement which
|
|||||||
|Expression | Meaning
|
|Expression | Meaning
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| * * * * * ? | Every second
|
| * * * * * ? | Every second
|
||||||
| 0 * * * * ? | Every minute
|
|
||||||
| 0 0 12 * * MON-FRI | Every Weekday at noon
|
| 0 0 12 * * MON-FRI | Every Weekday at noon
|
||||||
| 0 0 12 1/2 * ? | Every 2 days, starting on the 1st at noon
|
| 0 0 12 1/2 * ? | Every 2 days, starting on the 1st at noon
|
||||||
| 0 0 */12 ? * * | Every twelve hours
|
| 0 0 */12 ? * * | Every twelve hours
|
||||||
| @hourly | Every hour
|
| @hourly | Every hour
|
||||||
|
|
||||||
Note that the expression formatting has a part for seconds and the day of week.
|
|
||||||
For the day of week part, a question mark ? is utilized. This format
|
|
||||||
may not be parsed by all online crontab calculators or expression generators.
|
|
||||||
|
|
||||||
## Convenience scheduling
|
## Convenience scheduling
|
||||||
|
|
||||||
These special time specification tokens which replace the 5 initial time and date fields, and are prefixed with the '@' character, are supported:
|
These special time specification tokens which replace the 5 initial time and date fields, and are prefixed with the '@' character, are supported:
|
||||||
|
@ -184,15 +184,6 @@ SCENARIO("Examples from README.md")
|
|||||||
DT(2018_y / 03 / 1, hours{12}, minutes{13}, seconds{48})
|
DT(2018_y / 03 / 1, hours{12}, minutes{13}, seconds{48})
|
||||||
}));
|
}));
|
||||||
|
|
||||||
REQUIRE(test("0 * * * * ?", DT(2018_y / 03 / 1, hours{ 12 }, minutes{ 0 }, seconds{ 10 }),
|
|
||||||
{
|
|
||||||
DT(2018_y / 03 / 1, hours{12}, minutes{1}, seconds{0}),
|
|
||||||
DT(2018_y / 03 / 1, hours{12}, minutes{2}, seconds{0}),
|
|
||||||
DT(2018_y / 03 / 1, hours{12}, minutes{3}, seconds{0}),
|
|
||||||
DT(2018_y / 03 / 1, hours{12}, minutes{4}, seconds{0})
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
REQUIRE(test("0 0 12 * * MON-FRI", DT(2018_y / 03 / 10, hours{12}, minutes{13}, seconds{45}),
|
REQUIRE(test("0 0 12 * * MON-FRI", DT(2018_y / 03 / 10, hours{12}, minutes{13}, seconds{45}),
|
||||||
{
|
{
|
||||||
DT(2018_y / 03 / 12, hours{12}),
|
DT(2018_y / 03 / 12, hours{12}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user