in reply to Cron on Mac OS X

You can check that your crontab is executed by adding a simple line like
21 08 * * * date > /tmp/date.txt
and then checking whether the file /tmp/date.txt was changed. Another way is to profit from the fact that cron sends an email when a task prints something to the standard output.
MAILTO=your@mail.com 21 08 * * * date
Beware of the fact, that your cron tasks do not have the same environment (as $PATH, for example) as your shell does. That's where problems may arise.

Replies are listed 'Best First'.
Re^2: Cron on Mac OS X
by Ninth Prince (Acolyte) on Sep 09, 2008 at 16:02 UTC

    I tried using MAILTO (the script does print something to STDOUT), but I received no e-mail. I'm guessing that the crontab is just not executing. It has also been suggested to me that I might need to "start" my crontab. I'm not sure what that means. Thanks.

      Crontab is a frontend program for the cron deamon - that's the one that has to be running. You can tell whether it is by doing ps aux | grep cron. On Linux the deamon is usually called crond, on a Mac I've got access to, it's simply called cron.

      On Linux (the flavors I know) you put a startup script in /etc/init.d/, on Mac this should be handled by launchd, launchctl is used for the control over this demon.

      Can't tell you much more, my knowledge of Mac is very limited. Search the web, read the docs, wait for more replies...

      Hope that helps

        Okay, I've tried the command that you suggested and this is what I got.

        root 6217 0.0 0.0 76480 656 ?? Ss Fri12PM 0:00.06 + /usr/sbin/cron myname 7219 0.0 0.0 75960 340 s000 R+ 11:36AM 0:00.00 +grep cron

        I apologize for being so UNIX wimpy. I'm not sure, exactly, what this is telling me.