1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron Job with Hostgator

Discussion in 'Web Design' started by powerteam, Sep 17, 2010.

  1. powerteam

    powerteam Regular Member

    Joined:
    Sep 30, 2009
    Messages:
    454
    Likes Received:
    246
    Location:
    Tucson, AZ
    Im pretty sure I know what Im doing but just need someone to verify since their tech guy said that's out of the scope of what they do.

    I have a cron of */5 * * * * php -q /home/user/public_html/clients/pipe/pop.php

    I know */5 * * * * is the general settings for the time frame. So I can set that. Now the question is does:

    php -q /home/user/public_html/clients/pipe/pop.php

    go in the command line? The main thing confusing me is that I have never had a cron command with php -q in front of it like that, but these are .php files which I have never done before either.
     
  2. littleg2008

    littleg2008 Senior Member

    Joined:
    Dec 3, 2009
    Messages:
    861
    Likes Received:
    421
    Location:
    Cambridgeshire, UK
    i thought it was -s??

    Surely though as hostgator has cpanel, you dont have to set these in the command line, you can use the graphical interface to set the cron job
     
  3. nixnash

    nixnash Power Member

    Joined:
    Oct 26, 2009
    Messages:
    581
    Likes Received:
    204
    Occupation:
    Student
    Location:
    BHW
    i ran into similar problem while using cron job ,
    You need to key in your username for your hosting account ,
    You could use something like this
    php -q /home/username/public_html/pathtofile.php
    Hit thanks if you find this helpful.
     
    • Thanks Thanks x 1
  4. powerteam

    powerteam Regular Member

    Joined:
    Sep 30, 2009
    Messages:
    454
    Likes Received:
    246
    Location:
    Tucson, AZ
    Well where it says user in the command line I took out the user for security. So I can just:

    php -q /home/user/public_html/clients/pipe/pop.php

    in the command line as that is the path to the file?
     
  5. nixnash

    nixnash Power Member

    Joined:
    Oct 26, 2009
    Messages:
    581
    Likes Received:
    204
    Occupation:
    Student
    Location:
    BHW
    yeah it should work fine , on the top you see option update email address so you will receive email once cron job is completed.
    Go to file manager , and recheck the file path
    set time to every 1 minute for testing and check if it works....this is a seo forum though
    if you still have trouble contact hostgator technical support chat , they would look into this.
     
  6. nerdmoney

    nerdmoney Junior Member

    Joined:
    Feb 24, 2008
    Messages:
    135
    Likes Received:
    37
    Occupation:
    web nerd