Documentation

CRM_Core_JobManager
in package

This interface defines methods that need to be implemented by every scheduled job (cron task) in CiviCRM.

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

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
fixme

Looks like this is only used by "singleRun"

$singleRunParams

public array<string|int, mixed> $singleRunParams = []
Tags
fixme

How are these set? What do they do?

Methods

execute()

public execute([bool $auth = TRUE ]) : mixed
Parameters
$auth : bool = TRUE

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
string

getJob()

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
Tags
throws
Exception
Return values
CRM_Core_ScheduledJob

        
On this page

Search results