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!

SOLVED Run php file on cron job passing vars

Discussion in 'General Discussion' started by samuelmf, Dec 23, 2016.

  1. samuelmf

    samuelmf Well-Known Member

    Joined:
    May 22, 2006
    Messages:
    108
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Perú
    Hi actually i had this cron job

    php -f -q /home/lazybkp/public_html/classes/scClass.php?notifyAdmins=true

    But it didn't work, it's because at the end of the script i'm passing this vars ?notifyAdmins=true

    How can i make it work?

    Thanks in advance
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    721
    Likes Received:
    245
    Trophy Points:
    93
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    The following may be what you are looking for

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    samuelmf likes this.
  3. JacobPerkins

    JacobPerkins Well-Known Member

    Joined:
    May 2, 2014
    Messages:
    619
    Likes Received:
    96
    Trophy Points:
    103
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    You also need to turn on register_argc_argv in your PHP configuration to get this to work.
     
    linux4me2 and samuelmf like this.
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