Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wassim.hattab's avatar

Run Cron schedule on windows vps

Hello,

I have windows hosting and trying to create a cron i created the command and modified the kernel.php .

In laravel they mention this way to start the scheduler

* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1

but in a windows hosting how should i do it?

0 likes
1 reply
junaru's avatar

All it does is run the command every minute forever. So in theory you should add a scheduled task that will run every minute forever in the windows scheduler. The command should probably be something among the lines of:

C:\path\to\php C:\path-to-your-project\artisan schedule:run

However i have never tried doing this under windows.

Edit: you should probably set it to 'Run in' the 'C:\path-to-your-project' folder too just to be sure everything works as expected (even though the paths are in the command itself).

Please or to participate in this conversation.