Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    3

    Default Cron Job Help Please...

    Hello,
    I recently got a php script that does some tasks for me, but am having difficulty setting it up as a cron job.

    This is the email cron daemon sends to me when it attempts to execute every 5 minutes.

    Status: 404 Not Found
    X-Powered-By: PHP/5.2.13
    Content-type: text/html

    No input file specified.


    I have the php script installed like this.

    http://www.mydomain.com/specificfolder/actualscript.php

    now in the cron option i did this.

    set it up for 5 minutes

    and inputted this in the line field.

    php http://www.mydomain.com/specificfolder/actualscript.php
    ^ i did the space.

    Okay, I would really appreciate some help. Thanks a lot.
    I am sure the problem resides in the way I write the destination php file, but don't know how to properly put it in.

    Thank you

  2. #2
    Member Miraenda's Avatar
    Join Date
    Jul 2004
    Location
    Coralville, Iowa USA
    Posts
    244

    Default

    Try to change the http://www.mydomain.com/specificfolder/actualscript.php to the actual path to the file (/home/user/public_html/specificfolder/actualscript.php) rather than what you have. Also, try changing php to php -q, so you end up with:

    Code:
    php -q /home/user/public_html/specificfolder/actualscript.php

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    3

    Default Thanks...

    Okay, I did that, but the email i get now is

    No input file specified.

    thanks for the help by the way

  4. #4
    Member Miraenda's Avatar
    Join Date
    Jul 2004
    Location
    Coralville, Iowa USA
    Posts
    244

    Default

    Try /usr/local/bin/php instead of just php in the command instead. Also, are you sure you have the right path to the file (no errors in the username or folder name)?

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    3

    Default

    sorry, that last suggestion you made would go before the file destination?

    usr/fldr/cg/bin/php and then the location of the php script?

  6. #6
    Member Miraenda's Avatar
    Join Date
    Jul 2004
    Location
    Coralville, Iowa USA
    Posts
    244

    Default

    It would become:

    Code:
    /usr/local/bin/php -q /home/user/public_html/specificfolder/actualscript.php
    By not giving us the real path you are using (since this isn't the actual domain now but just a path with a username and who could guess your domain from a username, it seems you could provide the real information at this point), it makes it difficult to know if you are doing it right. If that still doesn't work, either you would want to open a ticket with your host or provide the real command you are using at that point.

Similar Threads & Tags
Similar threads

  1. How to cron job?
    By dachooch in forum New User Questions
    Replies: 4
    Last Post: 05-03-2010, 08:15 AM
  2. about cron job
    By persianwhois in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-14-2007, 08:28 AM
  3. cron job
    By albertldee in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-11-2003, 12:08 AM
  4. Cron Job
    By Dawson in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-13-2001, 07:06 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube