A class defining an asynchronous job, and mechanisms for saving and retrieving that job.
package |
CMS |
---|---|
author |
Robert Campbell |
copyright |
Copyright (c) 2017, Robert Campbell calguy1000@cmsmadesimple.org |
since | 2.2 |
property-read |
A unique integer id for this job (generated on save). |
property-read |
The unix timestamp that this job was first created. |
property-read |
The number of errors encountered while trying to pricess this job. |
__construct()
delete()
This method will throw exceptions if the job manager module is not available, or if for some reason the job could not be removed.
save()
This method will throw exceptions if the job manager module is not available, or if for some reason the job could not be saved.
execute()
Note: all jobs should be able to execute properly within one HTTP request. Jobs cannot count on administrator or data stored in session variables. Any data that is needed for the job to process should either be stored with the job object, or stored in the database in a user-independant format.
name : string
The name of this job. If not specified a unique random name will be generated.
string
module : string
The module that created this job. Useful if the job ever needs to be deleted.
string
start : integer
The minimum time that this job should start at.
integer
id : integer
A unique integer id for this job (generated on save).
integer
created : integer
The unix timestamp that this job was first created.
integer
errors : integer
The number of errors encountered while trying to pricess this job.
integer