Cron Job in cPanel with PHP

  Tim        2011-04-26 09:48:40       5,940        0    

Running PHP scripts automatically can have some big benefits. You can wait to have things get done when there is less traffic on your server, or you can ensure daily tasks get done on time.

cPanel Simple Cron
Even if you do not know anything about cron jobs, and have never run a cron job before - you can get started with the simple cron tool built into cPanel. The url for it is:

https://www.yoursite.com:2083/frontend/x/cron/simplecron.html?

A few things you'll need is the path to php and the path to the script that you'll be running. You will need the full path to do this. If your path to PHP differs then the one below, then change it - otherwise keep it as is. Don't know the path? This is most likely correct for you, just keep an eye out to see if the script does indeed run.

The command to run:
/usr/local/bin/php -f /home/(username)/public_html/(scriptname).php

Next you'll want to select an option from all the select boxes. Remember to select an option in each box. If you want something to run every day at 4AM, select Minute: 0; Hour: 4; Day: Every; Month: Every; Weekday: Every;

Click save and you are all set! You'll get an email every time the cron job runs, but if you don't want to get it - put :blackhole: into the output email field at the top.

Source : http://www.timlinden.com/blog/website-development/php-cron-jobs-with-cpanel/

PHP  CRON  AUTONOMOUS JOB  CPANEL  LINUX 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

Frontend backend weekend