如何在Windows 10中使用Laravel 5.1运行任务计划程序 [英] How to run task scheduler in windows 10 with Laravel 5.1

查看:172
本文介绍了如何在Windows 10中使用Laravel 5.1运行任务计划程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想问一下如何在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:

  1. 创建一个像这样的批处理文件并保存:

cd c:\laravel-project\

c:\php5\php.exe artisan schedule:run 1>> NUL 2>&1

  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运行任务计划程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆