include/SugarQueue/SugarCronJobs.php

Show: inherited
Table of Contents

\SugarCronJobs

Package: SugarCRM

CRON driver for job queue

Children
\SugarCronRemoteJobs
Api
 

Properties

Propertypublicbool  $disable_schedulers= 'false'

This allows to disable schedulers cycle, e.g. for testing

Default valuefalseDetails
Type
bool
Propertypublic\SchedulersJob  $job= ''

Currently running job

Details
Type
\SchedulersJob
Propertypublicstring  $lockfile= ''

Lock file to ensure the jobs aren't run too fast

Details
Type
string
Propertypublicint  $max_jobs= '10'

Max number of jobs per cron run

Default value10Details
Type
int
Propertypublicint  $max_runtime= '60'

Max time per cron run

Default value60Details
Type
int
Propertypublicint  $min_interval= '30'

Min time between cron runs

Default value30Details
Type
int
Propertypublicbool  $runOk= 'true'

Is current queue run OK?

Default valuetrueDetails
Type
bool
Propertypublicbool  $verbose= 'false'

Should the driver print reports to stdout?

Default valuefalseDetails
Type
bool

Methods

methodpublic__construct( ) : void

methodpublicexecuteJob( \SchedulersJob $job ) : void

Execute given job

Parameters
Name Type Description
$job \SchedulersJob
methodpublicgetMyId( ) : string

Return ID for this client

Returns
Type Description
string
methodprotectedjobFailed( \SchedulersJob $job = null ) : void

What to do if one of the jobs failed

Parameters
Name Type Description
$job \SchedulersJob
methodprotectedmarkLastRun( ) : void

Remember last time it was run

methodpublicrunCycle( ) : void

Run CRON cycle: - cleanup - schedule new jobs - execute pending jobs

methodpublicrunOk( ) : void

Check if the queue run was fine

methodpublicthrottle( ) : bool

Check if we aren't running jobs too frequently

Returns
Type Description
bool OK to run?
methodpublicunexpectedExit( ) : void

Shutdown handler to be called if something breaks in the middle of the job

Documentation was generated by DocBlox 0.18.1.