Cronjob

Status
Not open for further replies.

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
1. Only do this if you actually understand what a cron job is and have a reason for using one
2. You will need to configure your script to not output ANYTHING. If you need to have output, use fopen/fwrite or file_put_contents to log stuff to a file
3. Open up the Cron Jobs icon in cPanel, select an interval at which you wish to run your script (needs to be at LEAST every 5 minutes, trying to run a cron job every minute or trying to run two cron jobs at once will result in all of them being deleted)
4. In the command, type /usr/bin/php /home/yourcpanelusername/path/to/script.php > /dev/null &2>1
5. Save
 
Status
Not open for further replies.
Top