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 - "Could not open input file"

Discussion in 'General Discussion' started by Sublime74, Jan 1, 2011.

  1. Sublime74

    Sublime74 Registered

    Joined:
    Jan 1, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    I am trying to run a php cron job from cPanel on my web host. The command line I'm using is :

    /usr/local/bin/php -q /home/skat_2347/public_html/gdoucette.ca/cron.php

    The script runs fine when I run it in a browser, but when the cron job runs I get "Could not open input file"

    Any suggestions?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,172
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, you really should look into this more before setting it up. Something like this should work I think:

    Code:
     php -q /home/skat_2347/public_html/gdoucette.ca/cron.php /home/skat_2347/public_html/gdoucette.ca/ 
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Sublime74

    Sublime74 Registered

    Joined:
    Jan 1, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Thanks, but that didn't work either. That produced the error "input file not specified"
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,172
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are you sure you left a space after the file name /cron.php before the /home/ ?

    Try this:

    Code:
     php -q -f /home/skat_2347/public_html/gdoucette.ca/cron.php /home/skat_2347/public_html/gdoucette.ca/
    
    
     
    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