how to run program by cronjob?

cttsite

Verified User
Joined
Jan 16, 2005
Messages
22
i need prgram from cronjob
or by php script

my current path is
/home/abc/xxx
then i run menual by ./xxxx

can i run it with cronjob or php script?

i try with cronjob like this , but no work
cd /home/abc/xxx ./xxxx

hope some one help me
thanks,.
 
You must specify the path to php as well as options which may be needed
For example
/usr/local/bin/php /home/username/yourscript.php
 
jmstacey said:
You must specify the path to php as well as options which may be needed
For example
/usr/local/bin/php /home/username/yourscript.php

nope
i am not running php web script
i run some program like..
shoutcast.
 
Reread your post, I see what your getting at now.

"cd /home/abc/xxx ./xxxx" Would be considered two seperate commands and probably need to be split with &&.
So try something like:

"cd /home/abc/xxx && ./xxxx"
Have you tried executing the program using the full path as well? For example if you were trying to run a shell script:

"/home/abc/xxx/xxxx.sh"
 
Back
Top