[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pyatcron-devel-list] Cron and the "*/45" entry
From: |
Julien Olivier |
Subject: |
Re: [Pyatcron-devel-list] Cron and the "*/45" entry |
Date: |
Thu, 20 Nov 2003 17:23:30 +0000 |
> Hmm, not re-think, but get back to the first idea I guess, having list of
> integers as parameters.
>
Well, we'll have to revert to int arrays _and_ re-think the GUI :)
> Explanation: I went through the way Cron works, and in fact, for each
> time/date entry, it builds internally a list of "true" value. In other words,
> looking at the minute fields for example, Cron builds internally a list of
> minute value when the task is allowed to run.
>
> The "*", "nn-mm" or the "X/nn" representations are made to be human readable,
> but when Cron parse the crontab files, it builds list of values.
>
That's what I had understood after some tests.
> The "*" becomes "1,2,3,4,5,6,7,8,9,10,...56,57,58,59", "20-25" becomes
> "20,21,22,23,24,25" and finally, "*/22" which means every minutes from 0 with
> an increment step of 22 becomes "0,22,44"; This is really not "execute every
> 22 minutes" but "build a list of values from 0 to 59 with an increment step
> of 22 and use this list as true values for the minute field".
>
> So, in conclusion, if everyone agrees, I would like to fall back to list of
> integers for the get/set functions of the Scheduler. Then, the role of the
> GUI will be to map human suitable graphical objects with list of values.
>
The GUI is where the real problem is, I fear. Not that there is no
solution, but we will have to find a nice UI, not too cluttered, and
that's not easy.
Basically, I think the choices should be:
1) Run the task once at a given date and time
2) Run the task every seconds
3) Run the task every minutes
4) Run the task every hours
5) Run the task every days of a month at a given time
6) Run the task every weeks at a given week day, and at a given time
7) Run the task every months at a given day, and at a given time
8) Run the task every months at a given week, a given week day, and a
given times (for example, the last friday of each month at 5 PM).
9) Run the task every years, at a given date and time (for example,
each XMas at midnight).
10) Run the task every years, at a given month, a given week, a given
week day and a given time (for example, the first monday of each year at
8 AM).
2) and 3) could even be removed, as I don't why you would need them...
If anyone sees another use-case, let me know ?
My proposition of a GUI would be:
- first, you choose between those 10 options (2 and 3 could be removed
and some might grouped together, like 7 with 8 or 9 with 10, resulting
in 6 options).
- then, you configure it, by selecting the day, week day, time etc...
depending on the option chosen.
What do you think of that ?
--
Julien Olivier <address@hidden>