Have you looked in your mailbox with mail
? You will probably find error messages from cron
there. I found my expected error when I set cron
going before I created the script for it to run. One useful bit of information was the environment settings - which are often relevant to these problems. I got the information:
Message 1:
From [email protected] Thu Jan 12 20:16:01 2012
X-Original-To: jleffler
Delivered-To: [email protected]
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <jleffler@Isis> /bin/ksh /Users/jleffler/bin/Cron/minutely
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=jleffler>
X-Cron-Env: <USER=jleffler>
X-Cron-Env: <HOME=/Users/jleffler>
Date: Thu, 12 Jan 2012 20:16:00 -0800 (PST)
/Users/jleffler/bin/Cron/minutely[15]: exec: /work1/jleffler/bin/minutely: not found
This from an entry:
* * * * * /bin/ksh /Users/jleffler/bin/Cron/minutely
The other issue I see is your command line:
52 18 * * * username touch ~/webserver/AAAAA
What is the username
command? It isn't something I find on my Mac (MacOS X 10.7.2). Is it in /usr/bin
or /bin
on your machine? If not, the chances are high that it won't be found.
The /Users/jleffler/bin/Cron/minutely
script on my machine is a (symlink to a) script that reads a profile - I call mine .cronfile
- and then executes a command /Users/jleffler/bin/minutely
, all based on the basename of the file in the Cron
directory. This sets my PATH to something more useful than the system PATH provided by cron
.