diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-07-01 14:00:42 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-07-01 14:00:42 +0000 |
| commit | 307d6c1a7abe1ad7973c77168847a287d5a3e376 (patch) | |
| tree | 2cf9ad604eab57d83868545c8e64a4e1c80edbd2 /lib/models/CronjobTask.class.php | |
| parent | 7a8e62fb3a8faf5487d6c0f820370532d2e16924 (diff) | |
fix 'Static call to instance method' errors
Closes #1237
Merge request studip/studip!752
Diffstat (limited to 'lib/models/CronjobTask.class.php')
| -rw-r--r-- | lib/models/CronjobTask.class.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/models/CronjobTask.class.php b/lib/models/CronjobTask.class.php index 7bb2b6b..7540416 100644 --- a/lib/models/CronjobTask.class.php +++ b/lib/models/CronjobTask.class.php @@ -123,7 +123,7 @@ class CronjobTask extends SimpleORMap * "getParameters" from the task class. * * @param String $field Field which should be accessed. - * @return String Value of the method call + * @return mixed Value of the method call */ public function getValue($field) { @@ -163,7 +163,12 @@ class CronjobTask extends SimpleORMap public function scheduleOnce($timestamp, $priority = CronjobSchedule::PRIORITY_NORMAL, $parameters = []) { - return CronjobScheduler::scheduleOnce($this->id, $timestamp, $priority, $parameters); + return CronjobScheduler::getInstance()->scheduleOnce( + $this->id, + $timestamp, + $priority, + $parameters + ); } /** @@ -200,8 +205,16 @@ class CronjobTask extends SimpleORMap $priority = CronjobSchedule::PRIORITY_NORMAL, $parameters = []) { - return CronjobScheduler::schedulePeriodic($this->id, $minute, $hour, $day, $month, - $day_of_week, $priority, $parameters); + return CronjobScheduler::getInstance()->schedulePeriodic( + $this->id, + $minute, + $hour, + $day, + $month, + $day_of_week, + $priority, + $parameters + ); } /** |
