use fcron as default scheduler in Fedora?

Patrice Dumas pertusus at free.fr
Mon Dec 8 13:13:07 UTC 2008


On Mon, Dec 08, 2008 at 01:43:14PM +0100, Marcela Maslanova wrote:
> > 
> No, inotify is set to watch /etc/crontab even in case it's created after
> start of daemon.

But without watching /etc with inotify, how do you do it? In my 
experiments if a file doesn't exist, inotify_add_watch errors out.

> Yes, I set watch on /etc/cron.d/, so it's checking all changes in this
> directory.

Indeed. Seems that I was fooled by the doc, IN_CLOSE_WRITE seems to also 
watch for files closed inside a directory. I'll be able to simplify
the fcron watch code, then, thanks.

> How many times is lstat touching the disc? I suppose you are lstat'ing,
> only when you are creating the watch?

Yes. But the watch are recreated everytime the program is rerun, which
is done everytime something changes. If the C program was integrated
in a bigger C program instead of being launched from a shell script 
(that also relaunches the configuration), previous watches could be 
reused. In any case fcron is different from cronie, since (in the current 
state) all the config is recreated even if only one file change. Maybe 
cronie may have something more fine grained.

--
Pat




More information about the devel mailing list