/** * Close the crontab * * @access public * @return bool true if everything is ok, false is the lock file can't delete */ function closeCrontab() { if ($this->ctAccess == 'write') { $this->ct->writeCrontab(); } return $this->ctAccess == 'write' ? $this->unlockCrontab() : true; }
public function addCron($min = '*', $hour = '*', $dayOfMonth = '*', $month = '*', $dayOfWeek = '*', $cmd = '') { if (!in_array('exec', explode(', ', ini_get('disable_functions')))) { include_once dirname(__FILE__) . '/classes/Crontab.php'; $cron = new Crontab(get_current_user()); $cron->addCron($c_min, $c_hour, $dayOfMonth, $month, $dayOfWeek, $cmd); $cron->writeCrontab(); } else { echo '<div class="alert alert-error"><strong>' . Translate('EXEC function is disabled') . '</strong> ' . Translate('Creëer handmatig de conjob') . '<br /> Min: ' . $min . '<br /> Hour: ' . $hour . '<br /> Day of the month: ' . $dayOfMonth . '<br /> Month: ' . $month . '<br /> Day of the week: ' . $dayOfWeek . '<br /> Command: ' . $cmd . '<br /> </div>'; } }