Changeset 894 for trunk/Modules/Scheduler/Scheduler.php
- Timestamp:
- Jan 5, 2021, 10:30:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Scheduler/Scheduler.php
r893 r894 12 12 $this->Description = 'Allow to setup and execute planned and recurring tasks'; 13 13 $this->Dependencies = array(); 14 } 15 16 function GetModels(): array 17 { 18 return array(SchedulerAction::GetClassName(), Scheduler::GetClassName()); 14 19 } 15 20 … … 120 125 } 121 126 } 127 128 class Scheduler extends Model 129 { 130 static function GetDesc(): ModelDesc 131 { 132 $Desc = new ModelDesc(self::GetClassName()); 133 $Desc->AddString('Name'); 134 $Desc->AddBoolean('Enabled'); 135 $Desc->AddDateTime('ScheduledTime'); 136 $Desc->AddReference('Action', SchedulerAction::GetClassName()); 137 $Desc->AddInteger('Period'); 138 $Desc->AddDateTime('LastExecutedTime'); 139 $Desc->AddInteger('Duration'); 140 $Desc->AddText('Log'); 141 return $Desc; 142 } 143 } 144 145 class SchedulerAction extends Model 146 { 147 static function GetDesc(): ModelDesc 148 { 149 $Desc = new ModelDesc(self::GetClassName()); 150 $Desc->AddString('Name'); 151 $Desc->AddString('Class'); 152 return $Desc; 153 } 154 }
Note:
See TracChangeset
for help on using the changeset viewer.