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 command path

Discussion in 'General Discussion' started by Horvath, Oct 3, 2012.

  1. Horvath

    Horvath Registered

    Joined:
    Oct 3, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Wondering if I could pick your brain for a second.. I have a php script in my "/" root of server and for the life of me can not get my cron command to run it... Would you have a thought what the cron command path might be..?:

    If tried everything including:

    #!/usr/local/bin/php -q/home/username/myscript.php

    php -q/home/username/myscript.php

    I can it to run great when I place the script in a folder within my public_html. For instance, public_html/myscript/myscript.php


    with php -q/home/username/public_html/myscript/myscript.php That runs awesome with the cron command.

    but I don't want the script in my public_html at all..

    Thanks a Bunch for your time..
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,160
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The file would need to be owned by root, then, right? A user shouldn't be able to run a script outside his own account like this I don't think.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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