From 93b4312b6747f912f4c7f56dc6fb21a9ac3a159d Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Wed, 24 Apr 2024 23:18:50 +0300 Subject: [PATCH] Update Backup.php --- web/app/Models/Backup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/app/Models/Backup.php b/web/app/Models/Backup.php index 8029abc0..7259340f 100644 --- a/web/app/Models/Backup.php +++ b/web/app/Models/Backup.php @@ -33,11 +33,12 @@ public static function boot() private function checkCronJob() { - $findCronJob = CronJob::where('command', 'phyre-php artisan phyre:run-backup')->first(); + $cronJobCommand = 'phyre-php /usr/local/phyre/web/artisan phyre:run-backup'; + $findCronJob = CronJob::where('command', $cronJobCommand)->first(); if (! $findCronJob) { $cronJob = new CronJob(); $cronJob->schedule = '*/5 * * * *'; - $cronJob->command = 'phyre-php artisan phyre:run-backup'; + $cronJob->command = $cronJobCommand; $cronJob->user = 'root'; $cronJob->save(); }