From 5d42587168cc34f1e0c292e2c52630713f4723fc Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Wed, 2 Oct 2024 11:05:30 +0300 Subject: [PATCH] Update Backup.php --- web/app/Models/Backup.php | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/web/app/Models/Backup.php b/web/app/Models/Backup.php index 13929a1c..99bf4fcf 100644 --- a/web/app/Models/Backup.php +++ b/web/app/Models/Backup.php @@ -61,25 +61,26 @@ public static function boot() public function checkCronJob() { - $cronJobCommand = 'phyre-php /usr/local/phyre/web/artisan phyre:run-backup-checks'; - $findCronJob = CronJob::where('command', $cronJobCommand)->first(); - if (! $findCronJob) { - $cronJob = new CronJob(); - $cronJob->schedule = '*/5 * * * *'; - $cronJob->command = $cronJobCommand; - $cronJob->user = 'root'; - $cronJob->save(); - } - - $cronJobCommand = 'phyre-php /usr/local/phyre/web/artisan phyre:create-daily-full-backup'; - $findCronJob = CronJob::where('command', $cronJobCommand)->first(); - if (! $findCronJob) { - $cronJob = new CronJob(); - $cronJob->schedule = '0 0 * * *'; - $cronJob->command = $cronJobCommand; - $cronJob->user = 'root'; - $cronJob->save(); - } + + //$cronJobCommand = 'phyre-php /usr/local/phyre/web/artisan phyre:run-backup-checks'; + //$findCronJob = CronJob::where('command', $cronJobCommand)->first(); + //if (! $findCronJob) { + // $cronJob = new CronJob(); + // $cronJob->schedule = '*/5 * * * *'; + //$cronJob->command = $cronJobCommand; + //$cronJob->user = 'root'; + //$cronJob->save(); + //} + + // $cronJobCommand = 'phyre-php /usr/local/phyre/web/artisan phyre:create-daily-full-backup'; + // $findCronJob = CronJob::where('command', $cronJobCommand)->first(); + // if (! $findCronJob) { + // $cronJob = new CronJob(); + // $cronJob->schedule = '0 0 * * *'; + // $cronJob->command = $cronJobCommand; + // $cronJob->user = 'root'; + // $cronJob->save(); + // } return true; }