[Zope-dev] http://cvs.zope.org/Products/Scheduler vs Xron for cron-like functionality. Advice?

Joachim Werner joe@iuveno.de
Sat, 5 Oct 2002 11:32:12 +0200


> Hi All,
> I'm interested in starting to maintain Xron, if it has potential to be a
> stable products.
>  From the code it doesn't seem to do any strange things, but I would
> like to know if anybody has experience of using it in a production
> environment, or any other experiences and that would recommend not
> using it in a production environment.

We are using it, but there seem to be some problems. One of them is that I
frequently have cases where Xron doesn't reschedule properly (I am using the
improved user interface stuff for Xron, so the bug could also be in there).
What happens is that an event that is scheduled for daily execution at
midnight will not be rescheduled for the next day after it was executed, but
reset to the year 1970, which actually means it is switched off.

The other problem is more obvious, but still it is a major issue: Xron seems
to be incompatible with ZEO at the moment. The reason why is that the Xron
process starts on every ZEO client machine, so everything is executed more
than once. I could think of two policies to get around that, both of which
should be selectable as an option on a per-event base:

- Xron just runs on one server, e.g. the one that is on the fastest machine;
this is useful for cases where you need the events to be executed on the
same machine all the time, e.g. if you want to write stuff to the server's
local file system

- Xron runs on all servers (i.e. ZEO clients), but on a first come first
serve base, i.e. the server that executes the event first blocks the others
from doing so, too.

Another issue is that Xron will use the current virtual host settings when
it executes and reschedules an event. That means that the entries in the
Xron Schedule ZCatalog will have different URLs. In some cases the URL that
is used to execute an event could be important. E.g., we use Apache with
some tricky rewrite rules in front of Zope, and to get around the Apache
server the Zope server has to be called from a different URL.

I am willing to help with maintaining Xron, especially the part concerning
ZEO, because we really need it ...

Joachim