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

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

RE: [Pyatcron-devel-list] Cron backend: a correction


From: Xavier Nicolovici
Subject: RE: [Pyatcron-devel-list] Cron backend: a correction
Date: 15 Nov 2003 14:43:53 +0100

Hi,

I feel very nervous because most of the email I send from my office get lost. I've sent twice a class diagram to this mailing list to describe the various class and their inheritance tree I see so far. Something that may help you a lot Matthew to start coding. Grrr...

So here is another try to send this class diagram.

And here is quoted what I was saying in this past email:

I've tried to draft a class diagram, as it seems that nobody wants to assume this bad stuff ;-)
I've attached to this email a DIA diagram (
http://www.lysator.liu.se/~alla/dia/). Let me know what you're thinking about that. One remark, do not use PyAtCron prefix in class definitions; as they will be implemeted in the PyAtCron namespace, it's useless to prefix them.

Another important remark, before coding any kind of class, it would be good to have a clear design documents of what we need and what has to be implemented. After identifying the needed objects, we should define their fields and methods.



Bye,

Xavier

On Fri, 2003-11-14 at 17:24, Childers, Matthew wrote:
> > Ditto! : ) I'm not sure where to start...
> >
> > I've been reading through the code and stuff, to see how things have
> > thus far been implemented, but I'm not sure what I should do next.
LOL
> 
> I don't know if Matthew is currently working on it but we need a
> PyAtCronTask class which will contain all the common
properties/methods
> for each task. Then, we need a sub-class for each task type
> (PyAtCronTaskDownload, PyAtCronTaskCommand, PyAtCronTaskBackup
etc...).
> But, as I said, I think Matthew is working on it.

I am waiting on a definition of the PyAtCronTask class.  If we can
define what variables, methods.. we want in this class, I will start
putting it together.

Currently this is how I see it

	PyAtCronTask Class:
		Variables:
			Name
			TaskType - subclass
			Schedule - subclass
			Active

		Methods:
			getName - Returns Task Name
			setName
			getActive - Returns True/False
			setActive
			getCronStatement - Returns the full cron 
				command using the getCommand from
				PyAtCronTaskType and getCronSchedule
				From PyAtCronSchedule.  And comments
				It out if it is not active.
			

	PyAtCronTaskType Class:  (Will be inherited by all Task Types)
		Variables:
			Command

		Methods:
			getCommand - Returns Command Statement
			setCommand


	PyAtCronTaskSchedule Class:
		Variables:
			Minutes
			Hours
			Days
			Months
			Weekdays

		Methods:
			getNextRunTime - Returns Next Run Time
			getCronSchedule - Returns Schedule in form: 0 0
* * 1,3,5
			setMinutes
			setHours
			setDays
			setMonths
			setWeekdays
			getMinutes
			getHours
			getDays
			getMonths
			getWeekdays
			

Now, again, I am not an OO programmer, so this may not be what you all
are looking for at all, but if it is not, let me know what needs to be
changed so I can get started setting up these classes.

> 
> Another thing you could do is design the third page of the assistant,
> the one that will ask for the schedule of the task. It needs to be
very
> simple:
>  - Execute the task once
>  - Execute the task several times
>     - Once a day
>        - At which time ?
>     - Once a week
>        - On which day of the week ?
>     - Once a month
>     ...
> 
> It's hard to find an easy way to present a comprehensive set of
options,
> but you could try to find the best way...
> >
> >
______________________________________________________________________
> > _______________________________________________
> > Pyatcron-devel-list mailing list
> > address@hidden
> > http://mail.nongnu.org/mailman/listinfo/pyatcron-devel-list
> --
> Julien Olivier <address@hidden>
> 
> 
> _______________________________________________
> Pyatcron-devel-list mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/pyatcron-devel-list




_______________________________________________
Pyatcron-devel-list mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/pyatcron-devel-list
--
Xavier Nicolovici <address@hidden>

Attachment: class-diagram.dia
Description: GNU Zip compressed data


reply via email to

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