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 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:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    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.
     
Loading...

Share This Page