@@ 533-543 (lines=11) @@ | ||
530 | $this->getAbsoluteDir() . 'cron-dp.log'; |
|
531 | } |
|
532 | ||
533 | public function addAutoReboot() |
|
534 | { |
|
535 | $rebootTime = $this->getRebootAt(); |
|
536 | $script = $this->getRebootCommand(); |
|
537 | $item = new CrontabItem($script, $rebootTime->format('i'), $rebootTime->format('H')); |
|
538 | $crontab = new Crontab($this->getMachine()->getConnection()); |
|
539 | $crontab->addItem($item); |
|
540 | ||
541 | return $crontab->update(); |
|
542 | ||
543 | } |
|
544 | ||
545 | public function removeAutoReboot($rebootTime) |
|
546 | { |
|
@@ 545-554 (lines=10) @@ | ||
542 | ||
543 | } |
|
544 | ||
545 | public function removeAutoReboot($rebootTime) |
|
546 | { |
|
547 | ||
548 | $script = $this->getRebootCommand(); |
|
549 | $item = new CrontabItem($script, $rebootTime->format('i'), $rebootTime->format('H')); |
|
550 | $crontab = new Crontab($this->getMachine()->getConnection()); |
|
551 | $crontab->removeItem($item); |
|
552 | ||
553 | return $crontab->update(); |
|
554 | } |
|
555 | ||
556 | public function getServerCfgPath() |
|
557 | { |