[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Pyatcron-devel-list] Plugins and classes
From: |
NICOLOVICI Xavier |
Subject: |
RE: [Pyatcron-devel-list] Plugins and classes |
Date: |
Thu, 27 Nov 2003 08:55:30 +0100 |
> I remember in one of the emails on the list someone mentioned
> to me that
> you all had discussed how plugins will work before I joined the group.
> Can anyone explain what you had talked about to me? I've altered my
> original CrontTab class to become the ScheduledTask class as shown in
> the DIA diagram for the most part. But, I'm not sure what you
> mean with
> the setTask method. I'm also unclear about pretty much the whole
> GenericTask class. What's it supposed to do? What is the "parameters"
> attribute for? getExecCommand?
All, this demonstrate that before coding we should document what to do. In
software development project, coding represent 20% of the time, not more. And
40% is spent on documeting (requirements, specs, class definitions). The rest
is reserved for testing and packaging.
So, what I would really suggest is spend some time on the PyAtCron
documentation first. I'm currentl working on documenting Cron and At daemon to
understand how they work and what could be the issues for our project. Someone
should document the class definitions (name, fields, methods) and what they are
expected to do. This would avoid questions like Brain has.
If nobody wants to take over this job, then I'll do it ;-)
One remark Brian, the ScheduledTask has been renamed to Scheduler, and CronTask
as CronEntry. Another good reason to fully document classes before coding ;-)
> Also, I still don't understand why you want to use integers for the
> crontab string. If there is a cronjob set to be run every two hours do
> you mean you would write that out to the crontab entry as
> [0,2,4,6,8,10,12,14,16,18,20,22] for the hours field? Why not just a
> string like "*/2"?
Strings like "*/2" are definitely human shortcuts to edit crontab files. Cron
internally expand it to series of integers. So if we want to reproduce the
"*/2" entry, then we will provide a string like "0,2,4,6,8,.....56,58". And the
simplest structure to store such entries is an array of integer.
Also, do not focus too much on crontab structure, we are building an abstract
layer for Cron and At, this means that we should define the most suitable
architecture for the GUI, and implement links to Cron and At (and this is the
role of the CronEntry, AtEntry, CronEntryCollector and AtEntryCollector classes
I'm currently documenting).
Bye,
Xavier
This e-mail contains proprietary information some or all of which may be
legally privileged. It is intended for the recipient only. If an addressing or
a transmission error has misdirected this e-mail, please notify the author by
replying to the e-mail. If you are not the intended recipient you must not use,
disclose, distribute, copy, print, or rely on this e-mail.
We take reasonable precautions to ensure our e-mails are virus free. However,
we cannot accept responsibility for any virus transmitted by us and recommend
that you subject any incoming e-mail to your own virus checking procedures.