how do i use cronjob to execute my php script

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
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

how do i use cronjob to execute my php script

Post by adsegzy »

Hello friends, i have a php script meant to execute/run my php script (this script is to send databse backup my my email). Using the cronjob panel, i can set the time but i dont know how to set the command in the command space. The Location of the script i want to run is
public_html/phpmysqlautobackup/run.php
pls i need the exact command am to put in the command space. thanks
nite4000
Forum Contributor
Posts: 209
Joined: Sun Apr 12, 2009 11:31 am

Re: how do i use cronjob to execute my php script

Post by nite4000 »

can you tell me what system your server is?

you can try this

Code: Select all


/usr/local/bin/php -q  /home/USERNAME/public_html/PATH_TO/FILE.php 

Post Reply