* Add rector * Remove cache * Run rector again * Run pint * Run Rector in CI * Update composer.lock
30 lines
590 B
PHP
30 lines
590 B
PHP
<?php
|
|
|
|
namespace App\Console\Cron\Backups;
|
|
|
|
use App\Contracts\CronCommand;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class BackupRun extends CronCommand
|
|
{
|
|
protected $signature = 'cron:backup-run';
|
|
|
|
protected $description = 'Create a new backup';
|
|
|
|
public function handle(): void
|
|
{
|
|
$this->callEvent();
|
|
}
|
|
|
|
public function callEvent(): void
|
|
{
|
|
Artisan::call('backup:run');
|
|
|
|
$output = trim(Artisan::output());
|
|
if ($output !== '' && $output !== '0') {
|
|
Log::info($output);
|
|
}
|
|
}
|
|
}
|