Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cron instability?



I'm curious if anyone has noticed cron jobs being executed by the cron daemon from a user's (not root's) crontab on OS X Server Jaguar?

Is cron potentially unstable and unpredictable? Are there size limits in terms of entire crontab size? Limits on the maximum number of crontab entries (lines)? In one of my crontabs, I have over 100 entries. In some cases, I could use wild cards, but my preference is to be more specific and list the entire date. Also, I have to schedule my scripts down to the resolution of the unit second, thus the need to sleep (but I always sleep of course less than 60 seconds).

An example line from one of my typical crontab files is:

41 8 30 5 4 (sleep 27; $HOME/resources/mymachine/scripts/runThisScript >> $HOME/resources/mymachine/logs/cronout.log 2>&1)

as a test, I substituted my scripts above with a simple date command as in:

41 8 30 5 4 (sleep 27; date >> $HOME/resources/mymachine/logs/cronout.log 2>&1)

From my intensive crontab testing I had concluded (at least with the second line above using the date command) that cron would consistently call the command twice when the size of the crontab exceeded 20K. However, when the crontab entries become a tad longer in terms of line length (such as the first line above), the 20K rule doesn't apply. So now I'm starting to wonder if there is an entry line size issue (or perhaps a limit to the total number of lines one can have in a crontab file)?

There's very little information (both in the man pages and via Google searching) on any such restrictions with regard to both BSD OS variants (Free, Open Net) and even Linux, short of looking a the cron and crontab source files and trying to grok them (since the code documentation is sorely lacking in my opinion). There was a person who, about one year ago, seemed to do a makeover on Vixie's cron for NetBSD and this page mentions what seem to be numerous issues with cron:

http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=17238

Thanks for sharing any similar stories of cron daemons with user crontabs behaving erratically on Mac OS X Server.

-Brendan Lane Larson
_______________________________________________
macos-x-server mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macos-x-server
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.