Configure Cron for Drupal on Windows Server 2003

Tested on Windows Server 2003
Download wget for Windows (compiled)
Drupal version 6.x
Install wget

Unpack wget and place in C:\Windows\System32

Create php script
Create a file cronall.php and paste the code below in the file, you will be able to add more sites in the $addedSites array.


$cronUrl = 'http://%s/cron.php';
$addedSites = array();
$addedSites [] = '';
$addedSites [] = '';

$sites = array();

//default site
if(isset($addedSites) && is_array($addedSites)){
$sites = array_merge($sites, $addedSites);
foreach($sites as $site){
$cmd = 'wget --spider '.sprintf($cronUrl, $site);
echo 'Executing command: '.$cmd.'<br>';


Schedule a Task
- Go to Start|All Programs|Accessories|System Tools|Scheduled Tasks
- Add Scheduled Task
- Browse to C:\Program Files\PHP and select php-cgi.exe
- Give a name to the task (drupal cron schedule)
- Select how often and at what time the task must be executed.
- Enter the Username and Password which is used to execute the schedule
- Select Open advanced properties for this task when i click Finish.
Change Run in "C\Program Files\PHP\php-cgi.exe" cronall.php
- Change Start in C:\<drupal directory with cronall.php>
- Run the schedule


Check the schedule
Go to Administer|Status Report in Drupal and check if the Cron maintenance tasks executed correctly.