SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Cron Job help!!

  1. #1
    illegal ********* immigrant
    Join Date
    Jul 2005
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cron Job help!!

    Hey there,

    I want to open http://www.domain.com/update, what command should I use to do that?

    Thanks

  2. #2
    SitePoint Member
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I maybe wrong, but that doesn't seem like php. Unless I'm missing something. Do you have a php script your trying to open it with? Ah, you'd use something like

    Code:
    minute hour day-of-month month day-of-week wget -O /dev/null -q "http://www.domain.com/update"
    minute 0-59
    hour 0-23
    day of month 1-31
    month 1-12 (or names, see below)
    day of week 0-7 (0 or 7 is Sun, or use names)
    You have to replace the minute, hour, etc with the correct numbers. I'm actually working on a cron job manager php class. Because I didn't see any. Its half way done. But that maybe a while. Hope that helps

  3. #3
    illegal ********* immigrant
    Join Date
    Jul 2005
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply, I did not know where to post the thread.

    When I try to insert the command :
    Code:
     wget -O /dev/null -q "http://www.domain.com/update"
    ... in cpanel the part "http://www.domain.com/update" gets clipped automaticly!

    What's wrong??

  4. #4
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    probably the server management would be better as this isn't php.

    but anyway, try something like this in cpanel -> cron jobs -> command to run
    Code:
    /usr/local/bin/php -f /home/myusername/public_html/update
    You may need to find out what your path to php is. The second part is the absolute server path to the file to run.
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  5. #5
    SitePoint Member
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Wheeler.

  6. #6
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In cPanel it would usually look something like this:
    Code:
    php -q /home/username/public_html/update/index.php


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •