Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-07 Thread David Strauss
On Thu, Feb 7, 2013 at 8:11 PM, Lennart Poettering wrote: > We are very conservative in adding new deps to PID 1. PID 1 is an almost > kernel-like environment, if it goes down the entire system is > lost. Pulling in another library into this, that so far has not been > part of the usual Linux stac

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-07 Thread Lennart Poettering
On Tue, 05.02.13 11:54, David Strauss (da...@davidstrauss.net) wrote: > > Repeating myself, but I'll say it again: I strongly prefer a feature > set that is a subset of iCal/xCal [1]. I'd like it to be possible in > the future to expose existing and future runs via CalDAV over > something like th

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-07 Thread Lennart Poettering
On Tue, 05.02.13 12:42, Dave (d...@flex.com.au) wrote: > > In the year 2013, of the month of February, on the 4th day, Larry Baker > wrote: > > What about "2012-02~4" (leave off the "-")? Thus, "-" implies day (days > > from the start) of the month, "~" implies days from the end of the month.

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread David Strauss
On Wed, Feb 6, 2013 at 1:18 PM, Zbigniew Jędrzejewski-Szmek wrote: > Hm, but couldn't we add field for the sequence start? If necessary. I'd like to keep it separate from the recurrence rule, though. -- David Strauss | da...@davidstrauss.net | +1 512 577 5827 [mobile] _

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Feb 06, 2013 at 12:25:57PM -0800, David Strauss wrote: > On Wed, Feb 6, 2013 at 4:54 AM, Zbigniew Jędrzejewski-Szmek > wrote: > > I'm probably missing something, but if a start date and a count are set, > > then it should be possible to calculate the next event (or if all are > > now past)

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread David Strauss
On Wed, Feb 6, 2013 at 4:54 AM, Zbigniew Jędrzejewski-Szmek wrote: > I'm probably missing something, but if a start date and a count are set, > then it should be possible to calculate the next event (or if all are > now past) based on this data? Yes. I'm just saying that because systemd doesn't t

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Feb 06, 2013 at 12:37:51AM -0800, David Strauss wrote: > And, to bring this thread full-circle: > > [Timer] > Recurrence=FREQ=monthly;BYMONTHDAY=-1 > > That will run on the last day of each month. > > On Wed, Feb 6, 2013 at 12:34 AM, David Strauss wrote: > > Oh, one other current limita

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread David Strauss
And, to bring this thread full-circle: [Timer] Recurrence=FREQ=monthly;BYMONTHDAY=-1 That will run on the last day of each month. On Wed, Feb 6, 2013 at 12:34 AM, David Strauss wrote: > Oh, one other current limitation is that it doesn't let you specify a > time zone since the code just uses th

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread David Strauss
Oh, one other current limitation is that it doesn't let you specify a time zone since the code just uses the current time (effectively in UTC) for DTSTART. We could support actual time zones if necessary by having an additional field like TimeZone= that gets passed into the "next event" calculation

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-06 Thread David Strauss
Here is a version that is tested and, with review, I think ready to commit. This adds a unit test to exercise the "next event" logic, to/from string wrappers, and validity checks. This represents a near superset of existing scheduling. For example: * "FREQ=minutely" will execute every minute, st

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread David Strauss
I haven't tested this other than ensuring that it compiles with iCal support (default) and with --disable-ical. I opted for putting the modularity into which sources get compiled, like the gateway, which necessarily requires some #ifdefs in the timer code. I could also put the modularity into the

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Feb 05, 2013 at 06:48:23PM -0800, David Strauss wrote: > On Tue, Feb 5, 2013 at 6:17 PM, Kay Sievers wrote: > > Many of the things in iCal we *really* don't want or need, like the > > re-occurrence counters we would need to store and we likely don't want > > that kind of state, the time zo

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread David Strauss
On Tue, Feb 5, 2013 at 6:17 PM, Kay Sievers wrote: > Many of the things in iCal we *really* don't want or need, like the > re-occurrence counters we would need to store and we likely don't want > that kind of state, the time zones which I think we should entirely > ignore for a system service, wei

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread Kay Sievers
On Tue, Feb 5, 2013 at 10:15 PM, David Strauss wrote: > Is there interest in a patch? It looks like adding Recurrence= to > timer units to support iCal RECUR format would be trivial. I'm personally not too excited about supporting a full embedded "language for timers". :) Many of the things in i

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread Kay Sievers
On Mon, Feb 4, 2013 at 11:47 PM, Lennart Poettering wrote: > This definitely sounds useful. We should certainly extend our syntax to > support this, and the code for it wouldn't even be that difficult. > > However: we'd first have to come up with a nice syntax for it. I'd > assume we probably want

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread David Strauss
Is there interest in a patch? It looks like adding Recurrence= to timer units to support iCal RECUR format would be trivial. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread David Strauss
On Tue, Feb 5, 2013 at 11:54 AM, David Strauss wrote: > Repeating myself, but I'll say it again: I strongly prefer a feature > set that is a subset of iCal/xCal [1]. Here's a better exposition of the richness of RRULE: http://www.rahulsingla.com/blog/2010/12/parsing-ical-rrule It's also a great

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-05 Thread David Strauss
Repeating myself, but I'll say it again: I strongly prefer a feature set that is a subset of iCal/xCal [1]. I'd like it to be possible in the future to expose existing and future runs via CalDAV over something like the gateway. iCal already supports "last day of month schedules": FREQ=MONTHLY;INT

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-04 Thread Frederick Grose
On Mon, Feb 4, 2013 at 8:42 PM, Dave wrote: > In the year 2013, of the month of February, on the 4th day, Larry Baker > wrote: > > What about "2012-02~4" (leave off the "-")? Thus, "-" implies day (days > > from the start) of the month, "~" implies days from the end of the month. > > Nice. I

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-04 Thread Dave
In the year 2013, of the month of February, on the 4th day, Larry Baker wrote: > What about "2012-02~4" (leave off the "-")? Thus, "-" implies day (days > from the start) of the month, "~" implies days from the end of the month. Nice. I like this one. Simple, neat, and feels right. The tilde

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-04 Thread Larry Baker
On 4 Feb 2013, at 4:20 PM, Zbigniew Jędrzejewski-Szmek wrote: >> Suggestions what we could do instead? >> >> "2012-02-:4" maybe? >> >> "2012-02-~4"? > This one looks nice. What about "2012-02~4" (leave off the "-")? Thus, "-" implies day (days from the start) of the month, "~" implies days fr

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-04 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Feb 04, 2013 at 11:47:05PM +0100, Lennart Poettering wrote: > On Thu, 31.01.13 00:07, Dave (d...@flex.com.au) wrote: > > > Hi. I'm not on the maillist, but I recently read that systemd was planning > > to introduce an integrated job scheduler, if it isn't done already. > > > > If so, t

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-02-04 Thread Lennart Poettering
On Thu, 31.01.13 00:07, Dave (d...@flex.com.au) wrote: > Hi. I'm not on the maillist, but I recently read that systemd was planning > to introduce an integrated job scheduler, if it isn't done already. > > If so, then it would be very handy to introduce a way to run scheduled jobs > at the end

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-01-31 Thread David Strauss
On Wed, Jan 30, 2013 at 9:47 PM, Andrey Borzenkov wrote: > That's pretty common for running backups, performing accounting tasks > etc. I'm not too opposed, but maybe we should consider matching the feature set of an established standard like iCal repeating events? It'd be kind of neat to get an

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-01-30 Thread Andrey Borzenkov
В Wed, 30 Jan 2013 14:04:55 -0800 David Strauss пишет: > On Wed, Jan 30, 2013 at 5:07 AM, Dave wrote: > > Hi. I'm not on the maillist, but I recently read that systemd was planning > > to introduce an integrated job scheduler, if it isn't done already. > > > > If so, then it would be very han

Re: [systemd-devel] Feature request: schedule jobs for last day of month

2013-01-30 Thread David Strauss
On Wed, Jan 30, 2013 at 5:07 AM, Dave wrote: > Hi. I'm not on the maillist, but I recently read that systemd was planning > to introduce an integrated job scheduler, if it isn't done already. > > If so, then it would be very handy to introduce a way to run scheduled jobs > at the end of the mon

[systemd-devel] Feature request: schedule jobs for last day of month

2013-01-30 Thread Dave
Hi. I'm not on the maillist, but I recently read that systemd was planning to introduce an integrated job scheduler, if it isn't done already. If so, then it would be very handy to introduce a way to run scheduled jobs at the end of the month. It's something of a pet peeve I have with cron, th