Cron job to run .php

Discussion in 'PHP' started by donteatchicken, Sep 27, 2007.

  1. #1
    HI I'm trying to set up a cron job via godaddy that will execute a .php file on the server, anyone know an easy way to achieve this?

    I tried this as the cron command:

    /usr/local/bin/php /var/chroot/home/content/g/c/l/g****/html/area***/openclose/cronopen.php

    But got:

    No such file or directory

    So.. I'm sorta stuck, any help would be awesome.. thanks!
     
    donteatchicken, Sep 27, 2007 IP
  2. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    maiahost, Sep 27, 2007 IP
    donteatchicken likes this.
  3. donteatchicken

    donteatchicken Well-Known Member

    Messages:
    432
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    118
    #3
    yeah i'm testing it now... tried php no luck trying php5 now.. I'm assuming the etire command string consist only of:

    /web/cgi-bin/php5 $HOME/html/area***/openclose/cronopen.php

    Thanks for your reply!!
     
    donteatchicken, Sep 27, 2007 IP
  4. donteatchicken

    donteatchicken Well-Known Member

    Messages:
    432
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    118
    #4
    nah still getting:

    /bin/sh: line 1: /web/cgi-bin/php5 /var/chroot/home/content/g/c/l/g***/html/area***/openclose/cronopen.php: No such file or directory


    grrr!
     
    donteatchicken, Sep 27, 2007 IP
  5. donteatchicken

    donteatchicken Well-Known Member

    Messages:
    432
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    118
    #5
    Ahh! had some double quotes stuck in the command field somehow.. working perfect with:


    /web/cgi-bin/php5 $HOME/html/area**/openclose/cronopen.php


    Thanks again!!!..
     
    donteatchicken, Sep 27, 2007 IP