CRM_Core_JobManager
in package
This interface defines methods that need to be implemented by every scheduled job (cron task) in CiviCRM.
Tags
Table of Contents
Properties
- $_source : string|null
- $currentJob : CRM_Core_ScheduledJob
- $jobs : array<string|int, CRM_Core_ScheduledJob>
- Jobs.
- $singleRunParams : array<string|int, mixed>
Methods
- execute() : mixed
- executeJob() : mixed
- executeJobByAction() : mixed
- executeJobById() : mixed
- logEntry() : mixed
- setSingleRunParams() : mixed
- apiResultToMessage() : string
- getJob() : CRM_Core_ScheduledJob
- Retrieves specific job from the database by id.
Properties
$_source
public
string|null
$_source
= \NULL
Tags
$currentJob
public
CRM_Core_ScheduledJob
$currentJob
= \NULL
$jobs
Jobs.
public
array<string|int, CRM_Core_ScheduledJob>
$jobs
= \NULL
Format is ($id => CRM_Core_ScheduledJob).
$singleRunParams
public
array<string|int, mixed>
$singleRunParams
= []
Tags
Methods
execute()
public
execute([bool $auth = TRUE ]) : mixed
Parameters
- $auth : bool = TRUE
executeJob()
public
executeJob(CRM_Core_ScheduledJob $job) : mixed
Parameters
- $job : CRM_Core_ScheduledJob
executeJobByAction()
public
executeJobByAction(mixed $entity, mixed $action) : mixed
Parameters
- $entity : mixed
- $action : mixed
executeJobById()
public
executeJobById(int $id) : mixed
Parameters
- $id : int
logEntry()
public
logEntry(string $message) : mixed
Parameters
- $message : string
setSingleRunParams()
public
setSingleRunParams(mixed $entity, mixed $job, array<string|int, mixed> $params[, string|null $source = NULL ]) : mixed
Parameters
- $entity : mixed
- $job : mixed
- $params : array<string|int, mixed>
- $source : string|null = NULL
apiResultToMessage()
private
apiResultToMessage(mixed $apiResult) : string
Parameters
- $apiResult : mixed
Return values
stringgetJob()
Retrieves specific job from the database by id.
private
getJob([int $id = NULL ][, null $entity = NULL ][, null $action = NULL ]) : CRM_Core_ScheduledJob
and creates ScheduledJob object.
Parameters
- $id : int = NULL
- $entity : null = NULL
- $action : null = NULL