Click to See Complete Forum and Search --> : what is wrong with my crontab?????


PhatBarren
11-02-2001, 01:36 AM
Okay, i've been struggling with this cron stuff for days now. First, what is with that edito that we have to use with -e??????? But i get around that by just editing a file and using crontab file instead.
But my problem is my cronstabs don't execute the files they are supposed to!
here is what i have:
* * * * /usr/www/myprofile/mydomain/htdocs/myapp/cronscripts/MyExecutable

I have chmoded MyExecutable executable, and still nothing works. if I just go ./MyExecutable, then it executes correctly (it just makes a simple update in a mysql table as a test).

PLEASE HELP!!!!!!!!!!!!!!!!!!!!!

scanez
11-02-2001, 01:39 AM
You can edit your crontab with

crontab -e

There are 5 options for time in a crontab file, you've only specified 4. * * * * * will run the program every minute (right? not too much experience with crontab), is that what you want? What do you want to do?

SC

[ 02 November 2001: Message edited by: scanez ]

Lorithar
11-02-2001, 10:32 AM
crontab -e
by default invokes vi

export VISUAL=[your fav editor]
to change the behaviour. NB> your editor should best be a text mode editor NOT requiring Xwindows as you would most often use this from a command line interface.


You list only four elements to the cron instruction, you need 5

X_console
11-02-2001, 10:44 AM
It should be:
* * * * * /usr/www/myprofile/mydomain/htdocs/myapp/cronscripts/MyExecutable

For reference: http://it.yorku.ca/moonfrog/tutorials/scheduling.html

PhatBarren
11-02-2001, 11:15 AM
Hey,
Thanks for the responses. I am using 1 * * * * (so that it would execute the first (second, actually) minute of every hour. One of them just got cut off in the cutting and pasting!

ANyways, thanks for the tip on how to change my default editor, i can't stand VI!!!!!!!!!! pico rules :)

So that wasn't me problem any other suggestions?????????????

X_console
11-02-2001, 11:24 AM
Vi rocks!!! Just for that I'm not helping you anymore.

Just kidding. :D Okay, well your crontab seems correct, and you've made the program executable. Is crond running? Do you get any output when you type ps -e | grep crond? (note that -e and just e will cause ps to display different things. So make sure you use -e)