Files
hyperf_service/app/Command/stubs/cron.stub
ctexthuang 3a39ff3790
Some checks are pending
Build Docker / build (push) Waiting to run
feat: command
2024-10-26 18:27:45 +08:00

23 lines
463 B
Plaintext

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