summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-19 01:13:42 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-20 19:36:14 +0100
commit135168183ecb23f642b4f9fb9a50410e6735c628 (patch)
tree51f916796dcbc5a61d7abdd89c86f0c131297646
parent8e64fd110d85de45929cefcbf83aa506d60f8795 (diff)
calendar: support 'yearly' and 'annually' names the same way as cron
-rw-r--r--src/shared/calendarspec.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c
index 7979e2384f..7075159183 100644
--- a/src/shared/calendarspec.c
+++ b/src/shared/calendarspec.c
@@ -686,6 +686,23 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
if (r < 0)
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")) {
c->weekdays_bits = 1;