ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
JobRepository.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Cron\Job;
22 
24 
25 interface JobRepository
26 {
27  public function getJobInstanceById(string $id): ?\ILIAS\Cron\CronJob;
28 
29  public function getJobInstance(
30  string $a_id,
31  string $a_component,
32  string $a_class,
33  bool $isCreationContext = false
34  ): ?\ILIAS\Cron\CronJob;
35 
41  public function getCronJobData($id = null, bool $withInactiveJobsIncluded = true): array;
42 
43  public function registerJob(string $a_component, string $a_id, string $a_class, ?string $a_path): void;
44 
48  public function unregisterJob(string $a_component, array $a_xml_job_ids): void;
49 
50  public function createDefaultEntry(\ILIAS\Cron\CronJob $job, string $component, string $class, ?string $path): void;
51 
55  public function getPluginJobs(bool $withOnlyActive = false): array;
56 
57  public function resetJob(\ILIAS\Cron\CronJob $job): void;
58 
59  public function updateJobResult(
60  \ILIAS\Cron\CronJob $job,
61  \DateTimeImmutable $when,
62  \ilObjUser $actor,
63  JobResult $result,
64  bool $wasManualExecution = false
65  ): void;
66 
67  public function updateRunInformation(string $jobId, int $runningTimestamp, int $aliveTimestamp): void;
68 
69  public function updateJobSchedule(\ILIAS\Cron\CronJob $job, ?JobScheduleType $scheduleType, ?int $scheduleValue): void;
70 
71  public function activateJob(
72  \ILIAS\Cron\CronJob $job,
73  \DateTimeImmutable $when,
74  \ilObjUser $actor,
75  bool $wasManuallyExecuted = false
76  ): void;
77 
78  public function deactivateJob(
79  \ILIAS\Cron\CronJob $job,
80  \DateTimeImmutable $when,
81  \ilObjUser $actor,
82  bool $wasManuallyExecuted = false
83  ): void;
84 
85  public function findAll(): JobCollection;
86 }
getCronJobData($id=null, bool $withInactiveJobsIncluded=true)
Get cron job configuration/execution data.
Interface Observer Contains several chained tasks and infos about them.
deactivateJob(\ILIAS\Cron\CronJob $job, \DateTimeImmutable $when, \ilObjUser $actor, bool $wasManuallyExecuted=false)
$path
Definition: ltiservices.php:29
createDefaultEntry(\ILIAS\Cron\CronJob $job, string $component, string $class, ?string $path)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
updateRunInformation(string $jobId, int $runningTimestamp, int $aliveTimestamp)
updateJobSchedule(\ILIAS\Cron\CronJob $job, ?JobScheduleType $scheduleType, ?int $scheduleValue)
unregisterJob(string $a_component, array $a_xml_job_ids)
getPluginJobs(bool $withOnlyActive=false)
registerJob(string $a_component, string $a_id, string $a_class, ?string $a_path)
activateJob(\ILIAS\Cron\CronJob $job, \DateTimeImmutable $when, \ilObjUser $actor, bool $wasManuallyExecuted=false)
getJobInstance(string $a_id, string $a_component, string $a_class, bool $isCreationContext=false)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
updateJobResult(\ILIAS\Cron\CronJob $job, \DateTimeImmutable $when, \ilObjUser $actor, JobResult $result, bool $wasManualExecution=false)