Design Changes
Grzegorz Kulewski
kangur at polcom.net
Tue Sep 12 03:32:03 BST 2006
Hi,
On Tue, 12 Sep 2006, Scott James Remnant wrote:
[loooong snip]
> Waiting for Events
> ------------------
>
> This is a particular problem with the event-based system. It's easy to
> wait for either of two events to occur, you'd just put:
>
> on some-event
> on different-event
>
> in your configuration, and the first to occur starts you job.
>
> It's difficult to say that you need BOTH events to occur.
Exactly. I will bet that many jobs need to "start running" (or at least
"do something") when several things in the system are in some state and
should stop running (or "do something") if _even_ one of these things
leaves such approved state.
For example (really stupid but it is 4 am here): we have backup task. It
copies files from my encrypted partition to my portable 2.5" USB drive.
And I want it to do the backup when (and only when) all of that holds:
1. the encrypted partition is dm"de"crypted and mounted
2. my USB drive is attached
3. system load is < 0.5
4. disks are idle (whatever that means)
5. it is between 3am and 5am
and so on.
Even better - it should temporary suspend the backup (like SIGSTOP and
SIGCONT) if system load is >= 0.5 or one of the disks has something other
to do and end the job if any other thing happen.
It would be really good to have some way to express these without writing
large set of complicated rules.
BTW. I don't know if there is currently such feature but users (non root)
should be allowed to make their jobs that do things on certain time and/or
at system start/reboot/other-event-generated-by-that-user/event-from-set-
of-system-events-approved-by-root. Also there should be some possiblity
for reboot (and not only reboot) waiting (but with some timeout of course)
for such user's jobs to end. These features may require to have
system-global events and events in the scope of some user (with forced
diffent names to avoid any collisions).
Thanks,
Grzegorz Kulewski
More information about the Upstart-devel
mailing list