pyatcron-devel-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Pyatcron-devel-list] Cron and the "*/45" entry


From: Childers, Matthew
Subject: RE: [Pyatcron-devel-list] Cron and the "*/45" entry
Date: Thu, 20 Nov 2003 12:08:54 -0600

> > > 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 ?
> >
> 
> 
> What if we did something like a "Run the task every __ [drop down]"
and
> in the drop down give the choice of Seconds, Minutes, Hours, Days, and
> Months.  Then based on what they have chosen in the drop down, present
a
> different set of options to fine tune that schedule.  For example if
> they have chosen every 3 minutes, then we could show them a Between
> __:__ and __:__.  Just an example.  We could the options they see
based
> on what they select from the drop down.  What do you all think?
> 

I just realized that we probably can't give them the option to run a
task "every" x units.  Since cron doesn't actually run it that way, If
someone wanted to run it every 20 days, or every 45 minutes, a gui set
up like this would be very misleading as it would only run the task on
the 1st and 20th of the month, or the 1st and 45th minute of the hour.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]