In SugarCRM you can add Schedulers to execute repetitive tasks (like CRONs in LINUX). By default, SugarCRM comes with a list of predefined jobs, that can be setup via Admin -> Scheduler.
But if you want to implement a custom job and to be accessible in this module, you must do the following. The solution is implemented in an upgrade safe manner.

1. In custom/modules/Schedulers/ create a file named _AddJobsHere.php

// this file is actually included at the end of /modules/Schedulers/_AddJobsHere.php
//You can take a look on that file for more clarification

//create a new registered job
$job_strings[] = 'customJob';
function customJob(){
//this is where you put the custom code

2. Create the language file for new job: custom/modules/Schedulers/language/en_us.lang.php . If the path doesn’t exists you must create the directory structure.

$mod_strings['LBL_CUSTOMJOB'] = 'This string will appear in dropdown list of job field when you create or edit a new job in Sheduler ';


3. Perform a Quick repair and rebuild from Admin -> Repair area.

After that, in Amin -> Scheduler, if you click Create (or Edit an existing item), you will see that a new value appear corresponding “Job” dropdown list.

That’s all folks! :)