This class allows converting an old CmsRegularTask pseudocron task into an asynchronous background job.
Copyright (c) 2015, Robert Campbell firstname.lastname@example.org
This method will throw exceptions if the job manager module is not available, or if for some reason the job could not be removed.
This method will throw exceptions if the job manager module is not available, or if for some reason the job could not be saved.
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.
task : \CMSMS\Async\CmsRegularTask
The task to convert.
name : string
The name of this job. If not specified a unique random name will be generated.
module : string
The module that created this job. Useful if the job ever needs to be deleted.
start : integer
The minimum time that this job should start at.
id : integer
A unique integer id for this job (generated on save).
created : integer
The unix timestamp that this job was first created.
errors : integer
The number of errors encountered while trying to pricess this job.