calendar: support 'yearly' and 'annually' names the same way as cron
This commit is contained in:
parent
8e64fd110d
commit
135168183e
|
@ -686,6 +686,23 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
} else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) {
|
||||||
|
r = const_chain(1, &c->month);
|
||||||
|
if (r < 0)
|
||||||
|
goto fail;
|
||||||
|
r = const_chain(1, &c->day);
|
||||||
|
if (r < 0)
|
||||||
|
goto fail;
|
||||||
|
r = const_chain(0, &c->hour);
|
||||||
|
if (r < 0)
|
||||||
|
goto fail;
|
||||||
|
r = const_chain(0, &c->minute);
|
||||||
|
if (r < 0)
|
||||||
|
goto fail;
|
||||||
|
r = const_chain(0, &c->second);
|
||||||
|
if (r < 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
} else if (strcaseeq(p, "weekly")) {
|
} else if (strcaseeq(p, "weekly")) {
|
||||||
|
|
||||||
c->weekdays_bits = 1;
|
c->weekdays_bits = 1;
|
||||||
|
|
Loading…
Reference in a new issue