The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron Job, Run PHP script

Discussion in 'General Discussion' started by bowers01, Nov 18, 2010.

  1. bowers01

    bowers01 Registered

    Joined:
    May 10, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    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. bowers01

    bowers01 Registered

    Joined:
    May 10, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    hi,
    thanks for that, seems to be working fine.
    Regards,
    Nick
     
Loading...

Share This Page