QueuedJob extends Job
Simple base class for a one time background job
This is here if you want to do advanced stuff in your background jobs. For the most common use cases have a look at QueuedJob and TimedJob
Tags
Table of Contents
- $argument : mixed
- $id : int
- $lastRun : int
- $time : ITimeFactory
- __construct() : mixed
- execute() : mixed
- run the job, then remove it from the joblist
- getArgument() : mixed
- Get the argument associated with the background job This is the argument that will be passed to the background job
- getId() : int
- Get the id of the background job This id is determined by the job list when a job is added to the list
- getLastRun() : int
- Get the last time this job was run as unix timestamp
- setArgument() : mixed
- setId() : mixed
- setLastRun() : mixed
- run() : mixed
- The actual function that is called to run the job
Properties
$argument
protected
mixed
$argument
$id
protected
int
$id
$lastRun
protected
int
$lastRun
$time
protected
ITimeFactory
$time
Methods
__construct()
public
__construct(ITimeFactory $time) : mixed
Parameters
- $time : ITimeFactory
Tags
Return values
mixed —execute()
run the job, then remove it from the joblist
public
final execute(IJobList $jobList[, ILogger|null $logger = null ]) : mixed
Parameters
Tags
Return values
mixed —getArgument()
Get the argument associated with the background job This is the argument that will be passed to the background job
public
getArgument() : mixed
Tags
Return values
mixed —getId()
Get the id of the background job This id is determined by the job list when a job is added to the list
public
final getId() : int
Tags
Return values
int —getLastRun()
Get the last time this job was run as unix timestamp
public
final getLastRun() : int
Tags
Return values
int —setArgument()
public
setArgument(mixed $argument) : mixed
Parameters
- $argument : mixed
Tags
Return values
mixed —setId()
public
final setId(mixed $id) : mixed
Parameters
- $id : mixed
Tags
Return values
mixed —setLastRun()
public
final setLastRun(mixed $lastRun) : mixed
Parameters
- $lastRun : mixed
Tags
Return values
mixed —run()
The actual function that is called to run the job
protected
abstract run( $argument) : mixed