In windows you need Task Scheduler for that.
you need to run php.exe file in some regular interval and that file will execute your php script for example,
C:\Path\to\php.exe -f "C:\Path\to\file.php"
thus, with Windows Task Schedular you can run php.exe file in some regular interval with specified condition. Here are the steps,
1. Open Task Scheduler
2. In Task Scheduler, Click on "Action -> Create Task" from menubar.
3. In "General" tab write "Name"- Name of Task and "Description" - Description for Task
4. In "Triggers" tab click on "New" and give triggering time as per requirement.
5. In "Actions" tab click on "New" and select Action - Start Program (which is Default).
And from browse button select your php.exe file from your php installed files.
And in "argument" give file path with Option ex. -f c:\Path_To_Htdocs\fileName.php
(here -f
is option).
6. In "Conditions" tab you can set condition when to run task means about the your pc status like idle/on AC power, etc. I suggest you to leave it as default.
7. In "Settings" tab you can specify some extra settings. I suggest you to leave it as default.
8. Finally As you done, Click on "Run" from "Action" to run it manually.