Page 1 of 1

Cron Jobs?

PostPosted: 07. January 2008 12:41
by KallistaAEnvarou
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?

PostPosted: 07. January 2008 12:49
by Wiedmann
First, are Cron jobs possible in XAMPP?

That's part of your operating system. On Windows this is called: "Scheduled Tasks".

PostPosted: 07. January 2008 12:50
by KallistaAEnvarou
So how would I run file.php every 5 minutes or so?

PostPosted: 07. January 2008 12:58
by Izzy
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.

PostPosted: 07. January 2008 13:07
by KallistaAEnvarou
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?

PostPosted: 07. January 2008 13:11
by Wiedmann
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)