Create a new file at
customExtensionmodulesSchedulersExtScheduledTasks
Let it call “outright_do_repair.php”
Content on this file
<?php
array_push($job_strings, ‘outright_do_repair’);
Now go to
customExtensionapplicationExtUtils.php
Create a new file , let it call “outright_cron_utils.php”.
<?php
function outright_do_repair(){
require_once("modules/Administration/QuickRepairAndRebuild.php");
global $moduleList;
$repair = new RepairAndClear();
$repair->repairAndClearAll(array("clearAll"),$moduleList, true,false);
$exit_on_cleanup = true;
sugar_cleanup(false);
}
Now go to admin->Scheduler
Then create a new scheduler with created function and set the schedule time.