2 ms·
This is all pretty standard stuff for cron. Which isn't to say that it couldn't be better, but I think the main problem here is expecting it to work like other
by thaumaturgy 12y ago
This is all pretty standard stuff for cron. Which isn't to say that it couldn't be better, but I think the main problem here is expecting it to work like other parts of OS X.
With OS X specifically, launchd is trying to replace cron and you might be better off just using that. You can still create a cron job and get it to run and all that, but OS X is doing it with launchd and Apple has a tendency to pull the rug out from under people when it's convenient for them.
Cron will send both errors and program output to your local mail daemon. Pretty much all BSD/Linux/etc. systems have local mail delivery configured to drop stuff into /var/mail/[login username], to be read by the "mail" (or similar) commands on the commandline. If you don't want that, you have to set up a mail daemon and configure it to forward mail to your regular account using your ISP. OS X might have sendmail built in, which can do this (although sendmail configuration isn't very fun), or postfix should work too.
If email is too much of a hassle, you can use the >> operator at the end of your command to direct output to a file: [command] >> /path/to/file
And, yeah, cron runs in its own environment, so it won't have access to your PATH or other variables.