0

I create a web project, but my client have windows server, so I have a lot of problems to run "crons" on is server.

I have some controller on console of yii2, and I need to run them in some way on windows server. One of the codes is:

php yii contracts/fetch-payments

I think in create a .bat file, with the code, but I dont know if is the better way.

Thanks.

1 Answers1

0

Using Microsoft's built in task scheduler, you can launch something very similar to cron jobs.

you only need to create the command pointing to your executable php your/php/installation/path/php.exe ...

And you run it according to any time frame you would want.

This answer should help you configure task scheduler to run your php scripts How do I run a PHP script using windows schedule task?

nitrex
  • 522
  • 6
  • 16