launchd (was: cron) runs the daily script twice on Server 10.4.10

Axel Luttgens luttgens at fusl.ac.be
Thu Oct 18 04:24:40 PDT 2007


On 18/10/07 11:55, Brian Willoughby wrote:

> Hello,
>
> i have an Xserve with 10.4.10 and it's executing /etc/daily twice  
> instead of once.  This doesn't happen precisely every day, but only  
> misses maybe one day a week.  Something seems to be running periodic  
> a bit early, at 3:14, and then the expected execution at 3:15  
> occurs.  If there is only one execution on a given day, it seems to  
> always be at 3:15.
>
> Does anyone have a clue whether Apple's cron replacements in /System/ 
> Library/LaunchDaemons are buggy?  I see com.apple.periodic- 
> daily.plist and com.vix.cron.plist, as well as com.apple.atrun.plist  
> (but I don't think the latter is involved here).


Yes, there are some problems with tasks launched at "calendar intervals" 
under launchd.
Those problems are with us since 10.4...
But they are rather spurious, and one may have a box running for months 
without any glitch, and then suddenly execute such tasks twice as you 
just described.
Currently, when I want to have a task run periodically in a reliable and 
predictible way, I always configure it with cron (which is still there) 
instead of launchd.


> Could it be that Apple have set up a redundant system and never  
> noticed?  It seems that cron no longer calls the /etc/daily script,  


Yes, it is launchd, configured with 
/System/Library/LaunchDaemons/com.apple.periodic-daily.plist.

> so it must be periodic that is tripping up.  I've looked through /etc/ 
> periodic/daily and cannot find a problem.  


Fortunately... ;-)
Be "reassured", the problem is with launchd.

HTH,
Axel

>


More information about the MacOSX-admin mailing list