cron and php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kinetek
Forum Newbie
Posts: 5
Joined: Fri May 21, 2004 2:20 am

cron and php

Post 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.
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Close... but it won't work. Maybe this thread will help:

viewtopic.php?t=21849
kinetek
Forum Newbie
Posts: 5
Joined: Fri May 21, 2004 2:20 am

Post 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?
kinetek
Forum Newbie
Posts: 5
Joined: Fri May 21, 2004 2:20 am

Post by kinetek »

i figured it out. I ditched cron.daily and just used crontab instead.
Post Reply