Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    2

    Default Cron Job, Run PHP script

    Hi,
    I have a VPS with WHM/cPanel and want to run a php script atleast every minnute, how does one do this?

    Regards,
    Nick

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb Re: Cron Job, Run PHP script

    In your cPanel, (assuming you'll be running this as user) find the Cron Jobs icon and click. Find the Common settings drop down menu (I'm running CURRENT, YMMV) and select Every Minute.

    Next you need to add the command. Something like this should work:

    Code:
    php -q -f /home/username/public_html/path/tofile/yourfile.php /home/username/public_html/path/tofile/ cron 0 10

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    2

    Default Re: Cron Job, Run PHP script

    hi,
    thanks for that, seems to be working fine.
    Regards,
    Nick

Similar Threads & Tags
Similar threads

  1. How do I run a cron job?
    By SharonGilmore in forum New User Questions
    Replies: 4
    Last Post: 05-05-2011, 02:51 PM
  2. Replies: 0
    Last Post: 01-22-2010, 04:53 PM
  3. PHP script as Cron job
    By pphas in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-07-2008, 02:20 AM
  4. Replies: 3
    Last Post: 03-29-2007, 04:31 AM
  5. cron jobs - how to run a simple php script
    By adentone in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 09-19-2005, 06:26 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube