Skip to content
Advertisement

How do I run a PHP script using windows schedule task?

I have installed localhost/server in my machine and I need to run a php script using windows schedule task. how do I add path in “Actions” tab in schedule task / cofigure the script to run for particular period?

Advertisement

Answer

Locate the php.exe executable on your system and pass it the name of the script file using the -f parameter.

Example:

C:Xamppphpphp.exe -f C:Xampphtdocsmy_script.php

Reference:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement