Example #1
0
    } else {
        $cron_end = '';
    }
    $out['cronname'] = getTranslatedString($cron_mod, $cronTask->getModule());
    $out['hours'] = str_pad((int) ($cron_freq / (60 * 60)), 2, 0, STR_PAD_LEFT);
    $out['mins'] = str_pad((int) ($cron_freq % (60 * 60) / 60), 2, 0, STR_PAD_LEFT);
    $out['id'] = $cron_id;
    $out['status'] = $cron_st;
    $out['laststart'] = $cron_started;
    $out['lastend'] = $cron_end;
    if ($out['status'] == Vtiger_Cron::$STATUS_DISABLED) {
        $out['status'] = $mod_strings['LBL_INACTIVE'];
    } elseif ($out['status'] == Vtiger_Cron::$STATUS_ENABLED) {
        $out['status'] = $mod_strings['LBL_ACTIVE'];
    } else {
        $out['status'] = $mod_strings['LBL_RUNNING'];
    }
    $output[] = $out;
}
$smarty->assign('CRON', $output);
$smarty->assign('MOD', return_module_language($current_language, 'CronTasks'));
$smarty->assign('MIN_CRON_FREQUENCY', getMinimumCronFrequency());
$smarty->assign('THEME', $theme);
$smarty->assign('IMAGE_PATH', $image_path);
$smarty->assign('APP', $app_strings);
$smarty->assign('CMOD', $mod_strings);
if ($_REQUEST['directmode'] != '') {
    $smarty->display('modules/CronTasks/CronContents.tpl');
} else {
    $smarty->display('modules/CronTasks/Cron.tpl');
}
Example #2
0
 public function getMinimumFrequency()
 {
     return getMinimumCronFrequency() * 60;
 }