Cron Job on hostgator

Discussion in 'Site & Server Administration' started by rooothy, Mar 6, 2009.

  1. #1
    I'm trying to set up a cron job can someone tell me if i have the file path right
    usr/local/bin/php /home/xxxxxxx/xxxxxx/xxxxxx/components/com_craigslistautoresponder/craigslistautoresponder.php
     
    rooothy, Mar 6, 2009 IP
  2. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #2
    try below:

    php -q /home/xxxxxxx/xxxxxx/xxxxxx/components/com_craigslistautoresponder/craigslistautoresponder.php

    It should work.

    Kailash
     
    kailash, Mar 6, 2009 IP
  3. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #3
    I think should be:
    /usr/bin/php /home/xxxxxxx/xxxxxx/xxxxxx/components/com_craigslistautoresponder/craigslistautoresponder.php
     
    buldozerceto, Mar 7, 2009 IP
  4. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #4
    Actually, it's:

    /usr/bin/php -q -f /home/xxxxxxx/xxxxxx/xxxxxx/components/com_craigslistautoresponder/craigslistautoresponder.php &>/dev/null &
     
    zacharooni, Mar 15, 2009 IP
  5. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It be the safest to just use php which will use the PHP CLI. So doing php -q which in most cPanel machines will link back to /usr/local/bin/php . /usr/bin/php on most systems is actually the CGI version which seems silly to run since you're on the command line and should use the command line interface PHP :)
     
    InFloW, Mar 15, 2009 IP
  6. rooothy

    rooothy Active Member

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #6
    Thanks people for your advice.

    I forgot the first / before usr/local/bin/php

    Well this works for me so i'm gonna stick with it.
     
    rooothy, Mar 18, 2009 IP