Schedulers: We know them as cron jobs at Linux and scheduled tasks at Windows. CRON Job schedulers are the heart of any CRM system because they do automated tasks. Cron schedules are considered reliable and suitable for repetitive tasks like sending drip emails or monthly database pruning.


Automated tasks are key for any business like pulling emails, sending bulk emails, drip SMS, or BCC archivers. All of these tasks are possible because of schedulers. They simply perform the automated tasks in the backend.


Important Existing Schedulers in SuiteCRM


  1. Check Inbound Mailboxes: The purpose of this CRON Job is to check the inbound email inboxes after every one minute. Any new email found will be parsed to the CRM instantly.
  2. Prune Tracker Tables: This scheduler keeps track of activities of users performed in the edit view, list view, and detail view.
  3. Prune Database on 1st of Month: When this job is ON, the records that you soft deleted from CRM will be completely deleted from the CRM database as well. Usually, this job runs every month and clears out data on the 1st of every month.
  4. Run Nightly Mass Email Campaigns: This scheduler allows you to run an automated mass email campaign.

These 4 above are built into both CRM platforms and are very important to keep active.


How to set up a new scheduler


If you want to create a new scheduler via code. Here is the file structure you need to follow.

You will need to create 3 files for this.

First ='custom/Extension/modules/Schedulers/Ext/ScheduledTasks/outright_new_cron_job.php';
Second ='custom/Extension/application/Ext/Utils/outright_include_cron.php';
Third ='custom/Extension/modules/Schedulers/Ext/Language/en_us.outright_lang.php';

That's how files will show

1. Outright_new_cron_job.php

2. Outright_include_cron.php

3. en_us.outright_lang.php



As Often As Possible Job


Let's find out what is scheduled for every minute. It must be necessary for these every-minute jobs to run every minute, then only set for every minute. Because jobs are meant to run as quickly as possible, the CPU and OS are under more pressure to complete them on schedule as each minute goes by. This indicates that we have a good chance of making them run every minute. Therefore, if jobs don't need to run in this manner, they should ideally be changed from one minute to two minutes.


How to check if the Cron is running.


Open up any cron job whose status is active and they are supposed to AOPBaopb/asap. Under logs, there must be an entry of today if cron is running each minute.