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 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:
    1
    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:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    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/ 
     
  3. Sublime74

    Sublime74 Registered

    Joined:
    Jan 1, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    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/
    
    
     
Loading...

Share This Page