Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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:
    16,479
    Likes Received:
    421
    Trophy Points:
    583
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bowers01

    bowers01 Registered

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice