feat : good

This commit is contained in:
2024-12-20 17:58:47 +08:00
parent 6f29f811b5
commit 6cd9f70e6a
3 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
/**
* This crontab file is part of item.
*
* @author ctexthuang
* @contact ctexthuang@qq.com
*/
declare(strict_types=1);
namespace App\Cron\Good;
use Hyperf\Crontab\Annotation\Crontab;
#[Crontab(rule: "0 5 * * *", name: "CycleCreateTask", singleton: true , callback: "execute", memo: "这是一个示例的定时任务")]
class CycleCreateTask
{
public function execute()
{
//todo Write logic
var_dump(date('Y-m-d H:i:s', time()));
}
}