What is Correct way to Configure CRONJOB

Discussion in 'Site & Server Administration' started by infoaddicts, Jan 4, 2009.

  1. #1
    hi,

    just trying to configure a cron job but didn`t succeeded yet.

    here are few combination i tried.

    path setting suggested by host

    "/usr/bin/php -q /home/USERNAME/public_html/PathToFile"

    - should be in double quotes?
    - does spacing bewteen /php -q /home/ matters ?

    path setting suggested by script owner

    php/home/USERNAME/public_html/PathToFile

    Which one is correct ..any help would be deeply appreciated

    Thanks
    Ani
     
    infoaddicts, Jan 4, 2009 IP
  2. grk519

    grk519 Peon

    Messages:
    293
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How are you configuring this, from a control panel or from the command line (SSH)?
     
    grk519, Jan 4, 2009 IP
  3. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #3
    The below cron should work:

    php -q /path/to/php/file

    You can also use GET and wget but it depends on the server configuration.

    Kailash
     
    kailash, Jan 4, 2009 IP
  4. infoaddicts

    infoaddicts Active Member

    Messages:
    397
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    From Control Panel
     
    infoaddicts, Jan 4, 2009 IP
    mirainfo likes this.
  5. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #5
    Full path to php imho and don't use the quotes...it's an example of exact text.

    USERNAME also needs to be replaced with your own username for the account as that's your home path.
     
    RectangleMan, Jan 6, 2009 IP