CRM_Core_ScheduledJob
in package
This interface defines methods that need to be implemented by every scheduled job (cron task) in CiviCRM.
Tags
Table of Contents
Properties
- $action : string|null
- Class string
- $api_action : string
- Action of the job api call
- $api_entity : string
- Entity of the job api call
- $apiParams : array<string|int, mixed>
- Result of parsing multi-line `$parameters` string into an array
- $class : string
- Action
- $description : string
- Description of the job
- $domain_id : int
- Which Domain is this scheduled job for
- $id : int
- Job ID
- $is_active : bool
- Is this job active?
- $last_run : string
- When was this cron entry last run
- $name : string
- Title of the job
- $parameters : string
- List of parameters to the command.
- $remarks : array<string|int, mixed>
- Container for error messages
- $run_frequency : string
- Scheduled job run frequency.
- $scheduled_run_date : string
- When is this cron entry scheduled to run
Methods
- __construct() : mixed
- clearScheduledRunDate() : mixed
- Delete the scheduled_run_date from this job
- needsRunning() : bool
- saveLastRun() : mixed
- Update the last_run date of this job
- saveLastRunEnd() : mixed
- Update the last_run date of this job
Properties
$action
Class string
public
string|null
$action
= \NULL
Set as a URL, when the jobs template is rendered, but not set in other contexts
$api_action
Action of the job api call
public
string
$api_action
$api_entity
Entity of the job api call
public
string
$api_entity
$apiParams
Result of parsing multi-line `$parameters` string into an array
public
array<string|int, mixed>
$apiParams
= []
$class
Action
public
string
$class
Tags
$description
Description of the job
public
string
$description
$domain_id
Which Domain is this scheduled job for
public
int
$domain_id
$id
Job ID
public
int
$id
$is_active
Is this job active?
public
bool
$is_active
$last_run
When was this cron entry last run
public
string
$last_run
$name
Title of the job
public
string
$name
$parameters
List of parameters to the command.
public
string
$parameters
$remarks
Container for error messages
public
array<string|int, mixed>
$remarks
= []
$run_frequency
Scheduled job run frequency.
public
string
$run_frequency
$scheduled_run_date
When is this cron entry scheduled to run
public
string
$scheduled_run_date
Methods
__construct()
public
__construct(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
clearScheduledRunDate()
Delete the scheduled_run_date from this job
public
clearScheduledRunDate() : mixed
needsRunning()
public
needsRunning() : bool
Return values
boolsaveLastRun()
Update the last_run date of this job
public
saveLastRun() : mixed
saveLastRunEnd()
Update the last_run date of this job
public
saveLastRunEnd() : mixed