CronTab Cronjob on Windows Xampp


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.
by gwerker – founded here http://drupal.org/node/37277

12 thoughts on “CronTab Cronjob on Windows Xampp

  1. hi,

    i could not find the php.exe in my xampp folder….and when i gave the following

    C:\Program Files\xampp\php\php.exe c:\Program Files\xampp\htdocs\billing2\billing.php

    it said could not start

    1. Dont install XAMPP on “C:\Program Files” it won’t work correctly. Just install it on its default dir “c:/xampp” and i’m sure you won’t face any more problems.

  2. it adds -f between php.exe path and cron script path looks like : C:\cms\xampp\php\php.exe -f c:\cms\xampp\htdocs\executecron.php

  3. The burglar or burglars ransacked the house and took a gold wedding band with five small diamonds across it, a gold wedding ring with one large diamond in the middle and three smaller ones on either side of it, a man gold wedding ring, and an undisclosed amount of cash.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s