在高级模版中的 yii 文件,它是一个 linux 脚本,不需要使用php来运行。
create cron service command创建计划任务服务命令create a controller in console/controllers
在 console/controllers 文件夹下创建一个控制器
i have created as testcontroller.php
我创建了一个名为 testcontroller.php 的文件
d:\xampp\php\php yii test
cron service runnningd:\xampp\htdocs\yii2>how to pass params如何传递参数yii test/mail [--to=hemctest@gmail.com]
in windows for test it run as
在 windows 中测试如下
d:\xampp\htdocs\yii2>d:\xampp\php\php yii test/mail [--to=hemctest@gmail.com]
sending mail to [--to=hemctest@gmail.com]官方命令行应用开发文档见此
英文原文: how to implement cron in yii 2
本文由专注于成都网站建设的信易网络发布,更多关于yii的信息请关注信易网络随后的发布,信易网络的官网http://www.ir58.com
http://www.bkjia.com/phpjc/770659.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/770659.htmltecharticle以下由我们在信易网络公司开发项目的时候终结出的一些经验 create console application 创建命令行应用 in advance template there is already a file yii....
