PDA

View Full Version : Cron




Jesdisciple
Mar 11, 2008, 07:31 PM
Hello, I'm a WinXP user building a server application to regularly insert records into a database. Because the size of the database will grow rapidly, I need to regularly prune records from it, and the only way I can find is by 'cron' (or the OS equivalent).

I want my application to work in any environment, including every OS that I'm aware of. So do you know of any necessary Mac considerations related to the 'cron' command? For example... I read on dev.apple.com that OS X has a 'cron' command; is it the earliest release that does? How can I test (using PHP's 'php_uname' function) for Mac (and, if necessary, OS [version < 10])? Are there any syntax variations for 'cron'?

Thanks!



TEG
Mar 11, 2008, 07:37 PM
cron or chron jobs are common in the UNIX environment. cron is a POSTIX compliant call, therefor it should be the same in all *NIX environments.

TEG

Jesdisciple
Mar 12, 2008, 05:34 AM
cron or chron jobs are common in the UNIX environment. cron is a POSTIX compliant call, therefor it should be the same in all *NIX environments.Do you happen to know what php_uname (http://www.php.net/manual/en/function.php-uname.php) would return in Mac, or what resource(s) it uses to determine the return value? (I need to have a list of values which indicate supported environments.)

lazydog
Mar 12, 2008, 06:13 AM
Do you happen to know what php_uname (http://www.php.net/manual/en/function.php-uname.php) would return in Mac, or what resource(s) it uses to determine the return value? (I need to have a list of values which indicate supported environments.)

This is what php_uname() prints on mine:-

Darwin virgo.local 9.2.0 Darwin Kernel Version 9.2.0: Tue Feb 5 16:13:22 PST 2008; root:xnu-1228.3.13~1/RELEASE_I386 i386

Hope that helps!

b e n

Jesdisciple
Mar 13, 2008, 01:28 AM
Thanks, both of you! BTW, 'uname' is apparently the source of data on *nix for 'php_uname'.