问题描述
我只想问一下如何在Windows机器(我的本地机器)上使用它的任务计划功能.
I just want to ask how to use it's task scheduling feature on windows machine (my local machine).
我已经阅读了它的文档,并且注意到它正在使用Cron.
I've read it's documentation and I've notice that it's using a Cron.
我们非常感谢您的帮助.
Any help is truly appreciated.
推荐答案
要在Windows 10中运行Laravel Scheduler,您需要:
To run Laravel Scheduler in Windows 10 you need:
- 创建一个像这样的批处理文件并保存:
cd c:\laravel-project\
c:\php5\php.exe artisan schedule:run 1>> NUL 2>&1
-
转到Windows 10 Task Scheduler(快速方法是按
Win+R
并输入taskschd.msc
).
单击Create basic task
,选择When I logon
触发器,然后选择Start a program
->您的.bat
文件.
Click Create basic task
, choose When I logon
trigger and then choose Start a program
-> your .bat
file.
选中Open properties dialog
选项,然后单击Finish
.
在任务属性中,单击Triggers
,然后单击New
并添加新的触发器Repeat task every - 1 minute
.
In task properties click Triggers
, then click New
and add new trigger Repeat task every - 1 minute
.
现在,此任务将每隔一分钟运行一次Laravel调度程序.
Now this task will run Laravel scheduler every one minute.
这篇关于如何在Windows 10中使用Laravel 5.1运行任务计划程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!