1. Create a cron.bat file in windows using notepad and rename its extension by .bat to create batch file.

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

$data = file(”http://pankajdangi.com/cron.php”);
As per your cron job or cron tab you want to execute.

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.

2. Set up a scheduled task that calls this regularly:


a. Open Start–All Programs–Accessories–System tools–Scheduled tasks. or Go to Start-Settings-Controlpanel-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:\abc\xampp\php\php.exe c:\abc\xampp\htdocs\execron.php
D:\abc\wamp\php\php.exe c:\abc\wamp\www\execron.php




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