On Wed, 2006-01-11 at 18:50, ext Simon Budig wrote:
> Kimmo Hämäläinen ([EMAIL PROTECTED]) wrote:
> > I guess the 'API' is crontab(1) + crontab(5). It has probably been
> > tested in the course of time and proven good and stable.
> 
> Uh, not if you have potentially multiple programs simultaneously
> modifying the crontab. One faulty program could mess up your whole cron
> environment and you don't really want that.

We have also other places where multiple simultaneous programs would
screw things. Usually this can be avoided by the fact that the user can
only use one application at a time.

> 
> > I think the application developer will use the crontab(1) command and
> > the Glib API.
> 
> The crontab(1) command cannot add an entry to the crontab, all it can do
> is pop up $EDITOR for the user to edit the crontab. Not what you want.

My man page (old debian/testing) says that it can: "The first form of
this command is used to install a new crontab from some named file or
standard input..."

> 
> Glib also is not always a good idea: It can handle timeouts but does not
> make any guarantees about them. Plus - as florian already mentioned - it
> would require your program to run all the time and waste memory.

I think the user does not except atom clock precision anyway. Cron would
allow the application to be launched closer to the set alarm, so the
running time of the application could be minimised.

> 
> > We will try to re-use existing (preferably standard) software, so unless
> > cron is not enough, it will be preferred over some new daemon
> > implemented from scratch.
> 
> I'd love to have an API call that enqueues an alarm at a specific time
> (maybe even with a specific sound, but I doubt that it should provide
> any dialog facilities, that would make it quite complex) that calls back
> into the application via dbus. That would make it possible to disable
> alarms globally (similiar to the flight mode - a "cinema mode"  :) and
> would enable a list of scheduled alarms, regardless of the application
> that scheduled it.

You can use DBus from a crontab if you want (e.g. with dbus-send). Also,
stopping and restarting cron is possible.

> 
> You'd have to hack a lot around crontab to enable all this and I doubt
> that would be significantly less error prone than implementing that
> stuff e.g. in the Desktop application or a new demon specific to that
> task.

What was so difficult with cron?

BR; Kimmo

> 
> Bye,
>         Simon
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to