SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Schedule php or web page call

    I have a web page with php that calls out, get's some information and write's it to a database. I'd like to call this automatically through a scheduled process every few hours. What's the best way to do this? I'm running Xampp on a windows box if that makes any difference.

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    For windows you will need to look into Scheduled Tasks. Works in the same way as a cronjob for Linux.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    For windows you will need to look into Scheduled Tasks. Works in the same way as a cronjob for Linux.
    Thanks, but what do I actually call? Windows scheduler doesn't have a mechanism to call a web page.

    Is there a way to call a php script from command line?

  4. #4
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There certainly is:
    Code:
    c:\php\php.exe c:\path\to\scheduled\script.php
    Another tool to consider:
    http://cronw.sourceforge.net/
    Saul

  5. #5
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will also recommend cron , please go to you hosting panel and see if CRON is availible ... Itll help u set it up .

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah great, I didn't know you could call php that way. I'll give that a shot. cron is in the panel, so I'll give that a shot.

    Thanks guys.


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
  •