Laravel 5.1 Task Scheduling on Windows

前端 未结 4 2111
感动是毒
感动是毒 2021-02-11 06:45

I\'m trying to get Laravel 5.1 Task Scheduling working on IIS. When I run a batch file using Windows task manager it will run the task one time only. How can I get ->everyMinute

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-11 07:10

    Windows does support Laravel Scheduler but, you've to run the command on your own for multiple times. Since we can't use Windows Task Scheduler to run for every 1 min as we can do with linux crontab. If you're using windows for development environment and want to test if command is working on not you can try this

    If you run the

    php artisan schedule:run

    command for multiple times by giving a min gap for each trial it'll work.

    If you want to run directly the command you can follow this.

    "path\to\php.exe" "artisan" YourCommand > "NUL" 2>&1 &

    You can find path of your php.exe using below step.

    Run "where php.exe" in command prompt

提交回复
热议问题