Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    2

    Default Cron job - "Could not open input file"

    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. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb Re: Cron job - "Could not open input file"

    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. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    2

    Default Re: Cron job - "Could not open input file"

    Thanks, but that didn't work either. That produced the error "input file not specified"

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb Re: Cron job - "Could not open input file"

    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/

Similar Threads & Tags
Similar threads

  1. PHP/Cron Error -- Could not open input file:
    By partsace in forum New User Questions
    Replies: 1
    Last Post: 01-19-2010, 05:22 PM
  2. Replies: 5
    Last Post: 11-09-2009, 06:18 AM
  3. EasyApache PHP4/PHP5 "No input file specified"
    By ShaneK in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-18-2007, 08:56 AM
  4. HTML Editor - "No input file specified"
    By vpanageas in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-01-2006, 03:38 AM
  5. Replies: 8
    Last Post: 05-10-2006, 09:19 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube