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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    97
    Likes Received:
    3
    Trophy Points:
    158
    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:
    326
    Likes Received:
    94
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    The following may be what you are looking for

     
    samuelmf likes this.
  3. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    604
    Likes Received:
    94
    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