Cron Jobs?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cron Jobs?

Postby KallistaAEnvarou » 07. January 2008 12:41

OK, I'm trying to set up a way to parse files from a different website every so often (like once every 1-5 minutes, depending on how the slow the processing makes the server), so I'm guessing I would need a Cron job to process the information for when nobody is online, unless I leave my computer online and do a meta refresh every 5 minutes, which I'm not able to do since I'm not the person who pays for the server.

So I have two questions. First, are Cron jobs possible in XAMPP? I know that not having my server up since I'm not leaving the computer on would prevent the Cron jobs from running when I'm not on the computer, but at least I can experiment for when I put my site on my live server. If som, can someone send me to a tutorial describing how to do them?
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California

Postby Wiedmann » 07. January 2008 12:49

First, are Cron jobs possible in XAMPP?

That's part of your operating system. On Windows this is called: "Scheduled Tasks".
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby KallistaAEnvarou » 07. January 2008 12:50

So how would I run file.php every 5 minutes or so?
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California

Postby Izzy » 07. January 2008 12:58

I have no knowledge of cron jobs on Windows only familiar with cron on Linux.

...but I found this Tutorial doing a Google that may help and there was more reading in the search results.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby KallistaAEnvarou » 07. January 2008 13:07

That tutorial says that the minimum frequency is 1 hour. I need more frequency. So would I just have to set up like 12 different scheduled tasks?
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California

Postby Wiedmann » 07. January 2008 13:11

So how would I run file.php every 5 minutes or so?

First you need a PHP CLI script which do the job:
http://www.php.net/manual/en/features.commandline.php

And then you can setup Windows to execute this script every 5 minutes:
http://support.microsoft.com/?scid=kb%3 ... &x=16&y=13
(Windows have also it's own help. Just search for "scheduled tasks" in the Windows help and support center)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 30 guests