Quite a bit of functionality for SuiteCRM to run properly depends on the Scheduler. A cron job (or Task) on the server triggers the system to check for existing jobs to run and process new jobs. 

Workflows based on a schedule are a good example of this. Other out of the box functionality includes emails, reports scheduling, and cleanup jobs.

Further, as a system grows in complexity we often offload realtime events to run on a schedule so they run during off-peak hours to reduce server load. 

One issue with this is there is not much visibility into these jobs and whether there are issues with them or not. An admin would have to know to go look in the specific Scheduler record to look at the job log subpanel. There are also jobs that are inserted directly into the queue that may not show up because they aren’t associated with a scheduled job.

To help give visibility into this we modified an existing project to show the job_queue table in a module view. This allows to filter on or even build workflows when jobs fail.

Further work can be done to modify the way jobs are processed to add a priority so time-sensitive jobs are processed before less time critical jobs. See the link below to view the sample and source code on Github


Categories: Uncategorized