cron(8) mis-feature with @reboot long after system startup

Stefan Bethke stb at lassitu.de
Fri Nov 25 08:29:52 UTC 2011


Am 25.11.2011 um 08:02 schrieb Jason Hellenthal:

> When using @reboot with cron you expect your proccesses to always start when the system boots up and only when the system boots. But long after the system in question had been booted, my @reboot processes ran again! after a (/etc/rc.d/cron restart). This is normally fine and dandy until one of your @reboot jobs needs to contain a process that purges files "files that are already in use by a running daemon since the system has not rebooted" and becomes hazardous.
> 
> So with that said... is there a way we could actually make this run @reboot only ?

I didn't even know cron had this feature.  Why wouldn't you add custom rc.d scripts for these tasks, or add the commands to rc.local?


Stefan

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811





More information about the freebsd-hackers mailing list