mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-10 10:15:35 +08:00
initial commit. It works!
This commit is contained in:
17
src/cqbot/tasks/TickTask.php
Normal file
17
src/cqbot/tasks/TickTask.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: jerry
|
||||
* Date: 2018/4/28
|
||||
* Time: 下午4:00
|
||||
*/
|
||||
|
||||
class TickTask
|
||||
{
|
||||
public function __construct(Framework $framework, $timer_id) {
|
||||
$interval = ($framework->tick_time - $framework->run_time);
|
||||
if ($interval % 900 == 0) CQUtil::saveAllFiles();//15分钟存一次数据
|
||||
|
||||
//这里可以放置你的定时器内执行的功能,自由扩展
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user