Implementing your own scheduler functions for SugarCRM

If you want to implement custom scheduler functions for SugarCRM you should create the file custom/modules/Schedulers/_AddJobsHere.php and implement your functions there:

  if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

  array_push($job_strings, 'my_task');

   * Description of what my_task does.
   * @return boolean Returns TRUE on success and FALSE otherwise.
  function my_task() {
    // Add your code here.
    return TRUE;

Afterwards you’ll have to create the appropriate language file (e.g. custom/Extension/modules/Schedulers/Ext/Language/en_us.custom.php) to make the task show up by a human readable name in the sugar scheduler configuration.

$mod_strings['LBL_MY_TASK'] = 'My own sugarcrm scheduler task :-)';

Don’t forget to execute the quick repair command after adding the files to your sugarcrm installation.

Jens Grassel Written by:

Solving problems and burning chrome for fun and profit.