Can anyone help me with cronjob

Discussion in 'Site & Server Administration' started by DavidAusman, Feb 20, 2006.

  1. #1
    Hi
    Can anyone help me with cronjob plz!
    Assume that I want to run a script called wakeup.php in public_html/folder1/folder2/wakeup.php

    What is the command to execute this for every hour?
    Thanks
     
    DavidAusman, Feb 20, 2006 IP
  2. The Big Deal

    The Big Deal Peon

    Messages:
    212
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    For a PHP script every 1 Hour would be something like this:

    0 * * * * /usr/bin/php $home/public_html/folder1/folder2/wakeup.php
     
    The Big Deal, Feb 20, 2006 IP
  3. DavidAusman

    DavidAusman Peon

    Messages:
    399
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Does it has to include the $ sign?
     
    DavidAusman, Feb 21, 2006 IP
  4. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #4
    You could also just use curl and ping the page through your site..Its usually under /usr/bin (check w/ your host)...

    /usr/bin/curl mysite.com/ping.php

    (you need to add the http:slashslash as well - the forums is blocking me from adding that...)
     
    quaffapint, Feb 21, 2006 IP
  5. DavidAusman

    DavidAusman Peon

    Messages:
    399
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    DavidAusman, Feb 21, 2006 IP
  6. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Correct - with the appropriate timing setup as listed by the poster above (if you're doing it through cPanel, it will walk you through the timing piece).
     
    quaffapint, Feb 21, 2006 IP