ILIAS  release_8 Revision v8.24
class.ilStrictCliCronManager.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
24
26 {
27 $this->cronManager = $cronManager;
28 }
29
33 private function getValidPhpApis(): array
34 {
35 return [
36 'cli'
37 ];
38 }
39
40 public function runActiveJobs(ilObjUser $actor): void
41 {
42 if (in_array(PHP_SAPI, array_map('strtolower', $this->getValidPhpApis()), true)) {
43 $this->cronManager->runActiveJobs($actor);
44 }
45 }
46
47 public function runJobManual(string $jobId, ilObjUser $actor): bool
48 {
49 return $this->cronManager->runJobManual($jobId, $actor);
50 }
51
52 public function resetJob(ilCronJob $job, ilObjUser $actor): void
53 {
54 $this->cronManager->resetJob($job, $actor);
55 }
56
57 public function activateJob(ilCronJob $job, ilObjUser $actor, bool $wasManuallyExecuted = false): void
58 {
59 $this->cronManager->activateJob($job, $actor, $wasManuallyExecuted);
60 }
61
62 public function deactivateJob(ilCronJob $job, ilObjUser $actor, bool $wasManuallyExecuted = false): void
63 {
64 $this->cronManager->deactivateJob($job, $actor, $wasManuallyExecuted);
65 }
66
67 public function isJobActive(string $jobId): bool
68 {
69 return $this->cronManager->isJobActive($jobId);
70 }
71
72 public function isJobInactive(string $jobId): bool
73 {
74 return $this->cronManager->isJobInactive($jobId);
75 }
76
77 public function ping(string $jobId): void
78 {
79 $this->cronManager->ping($jobId);
80 }
81}
User class.
runJobManual(string $jobId, ilObjUser $actor)
resetJob(ilCronJob $job, ilObjUser $actor)
__construct(ilCronManager $cronManager)
deactivateJob(ilCronJob $job, ilObjUser $actor, bool $wasManuallyExecuted=false)
activateJob(ilCronJob $job, ilObjUser $actor, bool $wasManuallyExecuted=false)