Re: ANN: kronos, a task scheduler
From: rosendo (rosendo_at_dbora.com)
Date: 06/21/04
- Next message: Neil Benn: "ConfigParser Keys"
- Previous message: Jacek Generowicz: "Collecting Python's responses."
- Next in thread: Irmen de Jong: "Re: ANN: kronos, a task scheduler"
- Reply: Irmen de Jong: "Re: ANN: kronos, a task scheduler"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Jun 2004 05:45:50 -0700
Irmen de Jong <irmen@-nospam-remove-this-xs4all.nl> wrote in message news:<40af3b46$0$65124$e4fe514c@news.xs4all.nl>...
> Michele Simionato wrote:
>
> > I havent't looked at the code it is unclear to me if kronos is a kind of daemon
> > or not: what happens if I reboot my machine? Is it enough to restart kronos
> > in some init script to get the scheduled task to be executed at the right
> > times or is it more complicate than that?
>
> Kronos is not a daemon in the "crond" sense.
> When started, it runs as a separate thread or process alongside your
> own program. It doesn't store or remember the scheduled tasks by itself.
> It shouldn't be too hard to make some sort of persistent task definition
> (a "kronostab" if you will) and a little bit of extra code that reads
> this definition at startup.
>
> Perhaps it is a nice idea to add a feature to kronos that it can store
> the scheduled tasks by itself, so that if it is restarted, it re-reads
> the previous schedule file and continues where it left off.
> However, this may not be possible because the scheduled tasks contain
> references to Python functions (or callable objects) that will be called
> when the task is due, and those objects plus their environment will
> have to be reconstructed too...
>
> Because kronos uses the standard Python "sched" module, it will still
> execute the tasks at the correct times because the task is remembered
> by an absolute time value (i.e. 'next task is saturday may 22, 22:00').
>
> I just discovered two possible problems with the code that I posted:
> it should have thread locking around the scheduler's queue if you use
> a separate thread for the scheduler, and want to change the queue after
> the scheduler is started.
> The second issue is that you cannot change the queue after you
> started the scheduler, if using a separate process for the scheduler.
>
>
> Bye!
>
> --Irmen de Jong.
Can you publish some usage or examples or a man pages?.
Will help those who want to use this module! :-)
Cheers.
Rosendo.
- Next message: Neil Benn: "ConfigParser Keys"
- Previous message: Jacek Generowicz: "Collecting Python's responses."
- Next in thread: Irmen de Jong: "Re: ANN: kronos, a task scheduler"
- Reply: Irmen de Jong: "Re: ANN: kronos, a task scheduler"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|