-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2005-11-07 at 02:08 +0100, Joachim Schrod wrote:
Yeah, I checked the man page, too. But I don't think that the paragraph above is concerned with /etc/cron.d at all -- it tells only about the spool files (in /var/spool/cron/tabs that are managed by crontab(1)) and /etc/crontab. I was not successful in finding any documentation about the supposed behavior of /etc/cron.d files at all.
And if the intention is that `cron need not be restarted whenever a crontab file is modified', that intention is not successfully implemented for cron.d entries.
Or do I miss something that's significant in the paragraph above? Please advise.
Perhaps. The previous paragraph to that one says: Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; crontabs found are loaded into memory. Cron also searches for /etc/crontab and the files in the /etc/cron.d direc- tory, which are in a different format (see crontab(5)). Cron then wakes up every minute, exam- ining all stored crontabs, checking each command to see if it should be run in the current minute. When executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists). - From that I interpret that '/etc/cron.d' is also considered a "spool" directory. It is not explictly said, but I think that is the idea. It is directory of crontab files, so it is handled the same way, as explained in the next paragraph: Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has, cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab file is modified. Note that the Crontab(1) command updates the modtime of the spool directory whenever it changes a crontab. I think the doc writer just forgot to specify both directories. Note that it is faster to check the modtimes of two directories and one file, than all the modtimes of each file in both directories, as this is done every minute, and there could potentially be hundred of individual files there. It would not make sense. So the intention is that you edit any file there, then touch the directory. The program "crontab -e" does just that, but it only works for editing user files, I didn't see an option to edit cron.d/ files. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDbrgrtTMYHG2NR9URAlCEAJ9FXvlRhkOeVgxBO5vNi3hHvtaXPwCfbClv PxaHTjKZ3LhITiVpG4lqozM= =ZIQP -----END PGP SIGNATURE-----