docker-freepbx icon indicating copy to clipboard operation
docker-freepbx copied to clipboard

Cron line added didn't remain in crontab on final check. Check /tmp/cron.error for reason.

Open hariskar opened this issue 4 years ago • 0 comments

I get this when I try to add auto backup with time schedule (latest system and updated modules (15.0.16.73)) . I see it is an old issue, but I still have problems..

            $backup = $this->getAll();
            $newCrontab = $backup;
 
            if (!$this->checkLine($line)) {
                $newCrontab[] = $line;
                $this->installCrontab($newCrontab);
                if ($this->checkLine($line))
                    return true;
                // It didn't stick. WTF? Put our original one back.
                $this->installCrontab($backup);
                throw new \Exception("Cron line added didn't remain in crontab on final check. Check /tmp/cron.error for reason.");
            } else {
                // It was already there.
                return true;
            }
        } finally {
            $this->getLock()->release();
        }

hariskar avatar Sep 06 '20 06:09 hariskar