first commit

This commit is contained in:
2026-04-24 15:32:21 +02:00
commit 20d40fead4
5046 changed files with 641038 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
<?php
class DaemonTask {
private $pid;
private $sheduleType = array('year'=>0, 'month'=>0, 'week'=>0, 'day'=>0, 'hour'=>0, 'minute'=>0, 'second'=>0);
private $sheduleOffset;
private $masterPid;
public function getPid() {
return $this->pid;
}
public function SetPid($pid) {
$this->pid = $pid;
}
public function GetSheduleType() {
return $this->sheduleType;
}
public function SetSheduleType($sheduleType) {
$this->sheduleType = $sheduleType;
}
public function GetSheduleOffset() {
return $this->sheduleOffset;
}
public function SetSheduleOffset($sheduleOffset) {
$this->sheduleOffset = $sheduleOffset;
}
public function GetMasterPid() {
return $this->masterPid;
}
public function SetMasterPid($masterPid) {
$this->masterPid = $masterPid;
}
public function __construct() {
}
public function Run($masterPid) {
$this->SetMasterPid($masterPid);
$this->Action();
$this->ReShedule();
return true;
}
public function Action() {
return true;
}
public function ReShedule() {
$shedule = $this->GetSheduleType();
if(isset($shedule['year']) && $shedule['year']>0) {
//$next = mktime(0,0,0,date("m"), date("d"), date("Y")+$shedule['year']);
}
return true;
}
}
?>