[Ml-yokadi] Quaterly recurrence patch
Jonas Christian Drewsen
jdrewsen at gmail.com
Thu Jul 23 11:15:50 CEST 2009
On Wed, 2009-07-22 at 14:38 +0200, Aurélien Gâteau wrote:
> Sébastien Renard wrote:
> > Le mardi 21 juillet 2009 11:24:47, Jonas Christian Drewsen a écrit :
> >> I think quaterly is a pretty common term for "every three months".
> >>
> >> E.g. Dictionary.com : "a periodical issued every three months.".
> >>
> >> I myself need it for "quaterly report" tasks :)
> >
> > Sure, but that's not what your patch seems to do. It shedule a task for
> > Janury, April, July and October whatever the current month is. So, as we are
> > in July everything is fine but if you define a quarterly task in august, the
> > next occurrence will be in october, not november as it could be expected.
> >
> > Both two behaviour are correct, but I would like to be sure that you did it
> > intentionnaly.
>
> I am beginning to wonder whether we should stop adding too many
> recursion keywords and instead provide a cron-like syntax for advanced
> users.
>
> A quarterly report like Jonas implemented would be something like this:
>
> t_recurs 12 0 0 0 1-4-7-10 *
>
> or:
>
> t_recurs 12 0 0 0 1-12/3 *
>
> I think it would fit quite well with the Pythonic "make simple things
> simple and complex things possible".
I think it is great idea to add an advanced method of entering recursion
statements. I do think that the cron-syntax lacks a lot in this regard
though. For example, it cannot be used to express the simple rules that
are currently available.
Personally I think the best solution would be to add the new 'quarterly'
keyword (and not quaterly - thx David). Then make a wizard like
interface to the full rfc2445, that the dateutils is build upon, for the
advanced cases.
> (and this will give me a way to be reminded to get my paper trashcan on
> the street at 19:00 on monday every two weeks: "t_recurs 12 0 19 * *
> mon/2" :))
>
"0 19 * * mon/2" is not a valid cron expression afaik.
> Aurélien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sequanux.org/pipermail/ml-yokadi/attachments/20090723/bef26a07/attachment-0001.htm>
More information about the Ml-yokadi
mailing list