How do you get cron to work?

buc99

Don't Tread on Me!
I set up a mycrontab file in my user directory. I started cron and made sure cron was running correctly. I edited the crontab to run a program every 5 minutes. (Basically this program updates my IP info for the hosting service I use, ods.org) The crotab looks something like this:

*/5 * * * * root /usr/bin/odsupdate "username" "password" "host"

This should run the program odsupdate every five minutes with the variables following. For example I can run the program from the terminal just fine like:

$ /usr/bin/odsupdate "username" "password" "host"

This runs the program correctly. I thought that if I changed the user to "myusername" from root in the crontab that this would fix the problem. This does not fix the problem. The program is located in the PATH that is defined in the crontab. I have no idea whether the crontab is working correctly or not other than my IP is not being updated when I check it at the hosting service. I ran crontab -l and the correct crontab was listed leading me to assume that cron is running the correct crontab if it is runnin properly. Do I have something set wrong? Does cron work correctly in OSX 10.1.2? Any ideas what may be wrong?

Thanks in advance :)
SA
 
If this is a user crontab (edited via crontab -e), you don't put the username in there; so try

Code:
*/5 * * * * /usr/bin/odsupdate "username" "password" "host"
 
Back
Top