Skip to content

Commit

Permalink
Update Backup.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Apr 24, 2024
1 parent 134fa99 commit 93b4312
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/app/Models/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 93b4312

Please sign in to comment.