Page 1 of 1

cron and php

Posted: Fri May 21, 2004 12:43 pm
by kinetek
Just double checking on how to run a php script via cron. I want it to run daily so I just create a new file in cron.daily and in the file it would just have this one line:

/absolute_path/file.php

And then an empty line right? Thanks. These forums are great.

Posted: Fri May 21, 2004 1:13 pm
by launchcode
Close... but it won't work. Maybe this thread will help:

viewtopic.php?t=21849

Posted: Fri May 21, 2004 4:37 pm
by kinetek
thanks. another newbie question.

I have 4 different php locations:
/usr/bin/php /etc/php.ini /etc/php.d /usr/lib/php /usr/include/php

Which one do I use? I'm thinking /usr/bin/php.

so my file in cron.daily would contain:
/locationofphp /absolute_path/file.php

followed by an empty line correct?

Posted: Fri May 21, 2004 7:14 pm
by kinetek
i figured it out. I ditched cron.daily and just used crontab instead.