Adding your own recurring jobs to the Scheduler

sugarcrmdevelopers —  September 7, 2012 — 11 Comments

We talked about before on using the new Job Queue for scheduling one time jobs to run. But there are many cases where you have job to run that are reoccurring. Examples of this include database management, mass record changes needing to happen on a certain schedule, or jobs to poll the database for changes.

You can use the Ext framework for this. Simply define a job in a file named MyCustomJob.php in the custom/Extension/modules/Schedulers/Ext/ScheduledTasks/ directory that works something like this…

You can also one other bit to make the job description show cleanly in the Scheduler UI, by adding a textual language description for the job. For this example, the job name being ‘MyCustomJob’ as defined the $job_strings array, we would define a new language key LBL_MYCUSTOMJOB in file named en_us.MyCustomJob.php ( you can change en_us to match whatever language pack you are using ) in the custom/Extension/modules/Schedulers/Ext/Language/ like this…

You can then do a Quick Rebuild and Repair and the job will be available for scheduling on the Scheduler section in the Admin section.

Thanks to the Enable IT blog for the original pass at this post, which I updated to take advantage of the Ext framework changes in Sugar 6.3.

11 responses to Adding your own recurring jobs to the Scheduler


    Would be nice to have an example of how to make a Custom scheduler that mimics the Enter the URL Web request job just with a hardcoded URL. Would make for one less step in setting up lots of modules if that became common knowledge.


    Pretty sure you need to put that language file in:

    custom/Extension/modules/Schedulers/Ext/Language instead of Language(S) plural.


    Here is some additional help on how to define creating a Scheduler Task in your manifest and also on how to create a Scheduler Job automatically so that the user doesn’t have to do that process:

Trackbacks and Pingbacks:

  1. Automatic email sending. - December 20, 2012

    […] […]

  2. Integrate XERO with Sugarcrm - March 15, 2013

    […] […]

  3. workflow After time elapses - April 4, 2013

    […] […]

  4. Email Notification Script - April 30, 2013

    […] an email if the due date is due in 90 days (so due date – 90 days). What I did so far (inspired by this post: 1) Created a file in custom/Extension/modules/Schedulers/Ext/Language/en_us.ReminderMail.php: […]

  5. How to implement repeated notification in SugarCRM - May 23, 2013

    […] […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s