Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    2

    Default CronJobs

    Hello,
    my host has cPanel and I set up a cronjob with a mysql connection in the file.

    Now, I said to sent the status per job to me email, but I get this:
    /home/mikeo/public_html/game/__cron__uur__hour1337.php: line 1: ?php: No such file or directory
    /home/mikeo/public_html/game/__cron__uur__hour1337.php: line 2:
    : command not found
    /home/mikeo/public_html/game/__cron__uur__hour1337.php: line 3: syntax error near unexpected token `"localhost","mikeo_game","*****"'
    /home/mikeo/public_html/game/__cron__uur__hour1337.php: line 3: ` mysql_connect("localhost","mikeo_game","*****");
    '
    The ***** is my password (is correct for sure)...

    Does anyone know how to fix it?

    Thanks.

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    It looks like you're specifying the cron job task by merely entering the path to the PHP script.

    When doing so, the script will be executed in the same way as if it were executed from the command line and in order for that to work, you'd need to add a shebang line in your script - search the forums for info on how to do this.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    2

    Default

    Well,
    I now have this command:
    /usr/bin/php /home/xikeon/public_html/__cron__uur__hour1337.php
    Now nothing happens...

    EDIT!!!!
    Thanks, it works now
    Last edited by Xikeon; 09-29-2006 at 11:30 AM.

Similar Threads & Tags
Similar threads

  1. Cronjobs not saving
    By david.roman in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-01-2006, 12:30 AM
  2. Cronjobs
    By xynta in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-13-2005, 07:41 AM
  3. Cronjobs
    By welby in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 11-20-2005, 12:23 PM
  4. None of my Cronjobs are working :(
    By Bigzed in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-10-2005, 06:48 PM
  5. If you allow cronjobs
    By dgbaker in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 05-18-2003, 07:16 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube