예제 #1
0
 /**
  * Update job schedule
  * 
  * @param ilCronJob $a_job
  * @param int $a_schedule_type
  * @param int $a_schedule_value
  */
 public static function updateJobSchedule(ilCronJob $a_job, $a_schedule_type, $a_schedule_value)
 {
     global $ilDB;
     if ($a_schedule_type === null || $a_job->hasFlexibleSchedule() && in_array($a_schedule_type, $a_job->getValidScheduleTypes())) {
         $sql = "UPDATE cron_job SET " . " schedule_type = " . $ilDB->quote($a_schedule_type, "integer") . " , schedule_value = " . $ilDB->quote($a_schedule_value, "integer") . " WHERE job_id = " . $ilDB->quote($a_job->getId(), "text");
         $ilDB->manipulate($sql);
     }
 }