The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I start a Cronjob with Cpanel/WHM?

Discussion in 'Database Discussions' started by Bigzed, Mar 10, 2005.

  1. Bigzed

    Bigzed Registered

    Joined:
    Feb 19, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hey Guys,
    I'm using Cpanel and I'm trying to run a PHP Script but it's not working.
    It worked when I put "lynx --dumb" in front of the Path but my Provider told me thats not allowed.
    So what should I do?
    What Do I have to put in front of the Path/URL of the script?

    Thanks,
    Bigzed.
     
  2. germanette

    germanette Active Member

    Joined:
    Jul 26, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
  3. rodstewart

    rodstewart Active Member

    Joined:
    Feb 4, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hamburg Germany
    cPanel Access Level:
    DataCenter Provider
    If i do that i get

    /bin/sh: line 1: GET: command not found

    Anyone knows why?
     
  4. jester.ro

    jester.ro Well-Known Member
    PartnerNOC

    Joined:
    Feb 6, 2004
    Messages:
    304
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucharest, Romania
    cPanel Access Level:
    DataCenter Provider
    if you just want to run a php script, this is the best way:


    /usr/local/bin/php -f /home/your_username/path/script.php

    (make sure the php binary is there, ask you host for the location)

    i would recommend against having the php script in your public_html, because sometimes crons are used to do some maintanace on a database for example, and allowing others to run the maintanance script at other times would be bad
     
  5. rodstewart

    rodstewart Active Member

    Joined:
    Feb 4, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hamburg Germany
    cPanel Access Level:
    DataCenter Provider
    #5 rodstewart, Apr 8, 2005
    Last edited: Apr 8, 2005
Loading...

Share This Page