29 lines
936 B
PHP
29 lines
936 B
PHP
<?php
|
|
|
|
use App\Console\Commands\PurgeExpiredPressReleaseDrafts;
|
|
use App\Console\Commands\PurgeMagicLinks;
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Artisan::command('inspire', function () {
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|
|
|
|
// ========================================
|
|
// Tägliche Bereinigungen
|
|
// ========================================
|
|
|
|
// Magic-Links: Abgelaufene / verbrauchte Tokens entfernen (täglich 03:00)
|
|
Schedule::command(PurgeMagicLinks::class, ['--days=30'])
|
|
->dailyAt('03:00')
|
|
->withoutOverlapping()
|
|
->runInBackground();
|
|
|
|
// PM-Entwürfe: Zombie-Drafts nach 180 Tagen Inaktivität archivieren (wöchentlich)
|
|
Schedule::command(PurgeExpiredPressReleaseDrafts::class, ['--days=180'])
|
|
->weekly()
|
|
->sundays()
|
|
->at('04:00')
|
|
->withoutOverlapping()
|
|
->runInBackground();
|