mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update Backup.php
This commit is contained in:
parent
cff063b61a
commit
5d42587168
1 changed files with 19 additions and 18 deletions
|
@ -61,25 +61,26 @@ class Backup extends Model
|
|||
|
||||
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: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: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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue