protected function save() { $nexttime = $this->getElement($this->mainFieldset, 'nexttime'); $timestamp = rex_cronjob_manager_sql::calculateNextTime($this->intervalField->getValue()); $nexttime->setValue($timestamp ? rex_sql::datetime($timestamp) : null); $return = parent::save(); rex_cronjob_manager_sql::factory()->saveNextTime(); return $return; }
protected function save() { if ($this->isEditMode()) { $nexttime = $this->getElement($this->mainFieldset, 'nexttime'); if (strtotime($nexttime->getValue()) > 0) { $interval = $this->getElement($this->mainFieldset, 'interval'); $nexttime->setValue(rex_sql::datetime(rex_cronjob_manager_sql::calculateNextTime($interval->getValue()))); } } $return = parent::save(); rex_cronjob_manager_sql::factory()->saveNextTime(); return $return; }