-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
何平
committed
Feb 2, 2024
1 parent
2001a49
commit 266e5f8
Showing
6 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of Cloud-Admin project. | ||
* | ||
* @link https://www.cloud-admin.jayjay.cn | ||
* @document https://wiki.cloud-admin.jayjay.cn | ||
* @license https://github.com/swow-cloud/swow-admin/blob/master/LICENSE | ||
*/ | ||
use Hyperf\Crontab\Crontab; | ||
|
||
return [ | ||
'enable' => true, | ||
// 通过配置文件定义的定时任务 | ||
'crontab' => [ | ||
// Closure 类型定时任务 (仅在 Coroutine style server 中支持) | ||
(new Crontab())->setType('closure')->setName('Closure')->setRule('*/ * * * *')->setCallback(function () { | ||
\var_dump(\date('Y-m-d H:i:s'), 111111111); | ||
})->setEnvironments('production'), | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters