mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-01 03:08:06 +08:00
fix doc
This commit is contained in:
parent
b92b2b7eb9
commit
45bf51b4bd
@ -50,7 +50,13 @@ return [
|
||||
// Callback类型定时任务(默认)
|
||||
(new Crontab())->setName('Foo')->setRule('* * * * *')->setCallback([App\Task\FooTask::class, 'execute'])->setMemo('这是一个示例的定时任务'),
|
||||
// Command类型定时任务
|
||||
(new Crontab())->setType('command')->setName('Bar')->setRule('* * * * *')->setCallback(['command', 'di:init-proxy']),
|
||||
(new Crontab())->setType('command')->setName('Bar')->setRule('* * * * *')->setCallback([
|
||||
'command' => 'swiftmailer:spool:send',
|
||||
// (optional) arguments
|
||||
'fooArgument' => 'barValue',
|
||||
// (optional) options
|
||||
'--message-limit' => 1,
|
||||
]),
|
||||
],
|
||||
];
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user