kozo/quartz
该软件包最新版本(0.1.2)没有可用的许可信息。
0.1.2
2021-04-19 09:10 UTC
Requires
- kozo/watchmaker: 0.1.0
- laravel/framework: ^6.20.14|^7.0|^8.0
This package is auto-updated.
Last update: 2024-09-19 17:07:45 UTC
README
composer require kozo/quartz
创建 quartz 文件。
php artisan quartz:create
编辑 quartz 文件。
app/Quartz/QuartzCron.php
// sample
<?php
namespace App\Quartz;
use Watchmaker\Watchmaker;
class QuartzCron {
public function handle(Watchmaker $watchmaker): Watchmaker
{
$task1 = $watchmaker->task('php hoge/fuga.php');
$task1 = $task1
->month(1)
->day(5);
$watchmaker->add($task1);
$task2 = $watchmaker->task('php hoge/hoge.php');
$task2 = $task2
->month(2)
->day(6);
$watchmaker->add($task2);
return $watchmaker;
}
}
运行命令
显示
显示 "crontab" 和 "Quartz" 之间的差异。
php artisan quartz:show
安装
安装 "crontab" 和 "Quartz" 之间的差异。
php artisan quartz:install