The aggregator module says I need 'crontab' to do automatic RSS feed updates. How do I do this on a WIndows\XAMPP machine? It would help if the module docs included this information in their readme.

Comments

gwerker’s picture

I've set this up on an XP box with XAMPP installed. Here's how:

1. Create a php file that calls the cron.php file: Using notepad (or whatever), paste the following into a new file:

$data = file("http://pearl.supplychain.com/cron.php");

you'll need to put it inside the regular php tags, with the "less than sign" ? php at the front, and the ? "greater than sign" at the end. (I can't seem to just type that because it is "suspicious content" and drupal doesn't allow it)

Save it as executecron.php, into the same directory as cron.php (htdocs).

2. Set up a scheduled task that calls this regularly:
a. Open Start--All Programs--Accessories--System tools--Scheduled tasks.
b. Double-click on scheduled tasks.
c. Set up a Daily task that starts at 12:00 am and runs every half hour (or whatever) until 11:59 pm. Tell the task to "run" the following:

C:\cms\xampp\php\php.exe c:\cms\xampp\htdocs\executecron.php

(On this system, php.exe is installed in C:\cms\xampp\php, but you'll probably have to change the path).

Note: If using the machine, you'll see the command window open for a couple seconds whenever it runs the cron task. This is rather confusing at first.

mandyrc’s picture

I read a forum post where somebody explain how to run cron on windows using scheduling task.

Solution:

A quick thought might be to invoke an installed Windows application and make it call the desired URL, but this is not reliable. The proper solution is based on the use of a core web application that handles CGI processes on the server. If PHP or Perl is installed, the cronTab trigger file (URL) can be called as an arguement of Perl or PHP.

Implimentation/How to:

* Create a batch file (for example: CRON.BAT) and add the following line into it:
C:\PHP\PHP.exe cron.php (Ex. in my case: c:\wamp\php\php.exe c:\wamp\www\drupal\cron.php)
Where the first portion is referring to where the PHP application server executable file is and cron.php is the file that you want the PHP application to run. Depending on your director structure, you can adjust the paths accordingly so that the system can find the components (Specifying the paths in your PATH settings can help you locate the PHP application without a directory structure)

* Create a Windows schedule event and make it call CRON.BAT as frequently as you would like the cron to be run and there you have your CRONTAB implimented in Windows.

* Every time thatcrontab is run, Windows will open a DOS window and close it once the process is finished.

I use this method and works fine... I hope that this information has been useful

canen’s picture

Use the poormanscron module.

bigbman’s picture

That did it - thanks!!!

Jaza’s picture

If your windows machine is your home PC, and you're just using it as a development and test server, don't bother with setting up cron. Just type in:

http://localhost/yourdrupalsite/cron.php (actual address will vary)

If your actual server is running Windows, switch to *NIX. ;-)

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

crystal_spice’s picture

Thanks for putting this information up.

pranky27’s picture

Hello All,

You can find a steps to configure cron on wamp and xampp.

http://www.pankajdangi.com/2009/05/crontab-cronjob-on-windows-xampp-wamp/

Thanks
Pankaj