Windows has the "windows scheduler" and doesn't have cron. You'll have to add the task there, in settings/administration instead. It is very easy.Windows has the "windows scheduler" and doesn't have cron. You'll have to add the task there, in settings/administration instead. It is very easy.
1. Create a cron.php file (the code you want to execute at a regular interval)
2. Create a CRON.BAT file, copy and past the below code in the file
D:\xampp\php\php.exe D:\xampp\htdocs\Application\cron.php
The path I have written is according to my xampp and cron.php file, update the path of files according to your system directory
3. To schedule a task
Click on start > All Programs > Accessories > System Tools > Scheduled Tasks
Or you can go directly
Control Panel > Scheduled Tasks
Right click in the folder
New > Schedule Task
Give appropriate name to the Task.
In the RUN text field… Type the complete path of the CRON.BAT file
in my case it is
D:\xampp\htdocs\Application\CRON.BAT
Set the schedule of the job, you can use advanced button if required.
I hope this all will help you. Please leave your comment if you face any issue in setup cron job in windows 1. Create a cron.php file (the code you want to execute at a regular interval)
2. Create a CRON.BAT file, copy and past the below code in the file
D:\xampp\php\php.exe D:\xampp\htdocs\Application\cron.php
The path I have written is according to my xampp and cron.php file, update the path of files according to your system directory
3. To schedule a task
Click on start > All Programs > Accessories > System Tools > Scheduled Tasks
Or you can go directly
Control Panel > Scheduled Tasks
Right click in the folder
New > Schedule Task
Give appropriate name to the Task.
In the RUN text field… Type the complete path of the CRON.BAT file
in my case it is
D:\xampp\htdocs\Application\CRON.BAT
Set the schedule of the job, you can use advanced button if required.
I hope this all will help you. Please leave your comment if you face any issue in setup cron job in windows :)
robertman11
Are you sure you want to delete this post?