<?php
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');
// Schedule: Run queue worker every minute to process pending jobs
Schedule::command('queue:work', ['database', '--stop-when-empty', '--tries=3', '--max-time=50'])
->everyMinute()
->withoutOverlapping();
// Schedule: Clean up expired cart reservations every 5 minutes
Schedule::command('cart:cleanup-expired-reservations')
->everyFiveMinutes()
->withoutOverlapping();
// Schedule: Update currency exchange rates daily at 3 AM
Schedule::command('currencies:update-rates')
->dailyAt('03:00')
->withoutOverlapping();
// Schedule: Clean up old logs daily at 2 AM (User Activity Logs, Supervisor Activity Logs, Completed Jobs older than 20 days)
Schedule::command('logs:cleanup')->dailyAt('02:00');
// Schedule: Check for pending review cards older than 48 hours and send escalation notifications
Schedule::command('cards:check-pending-reviews')->daily();
// Schedule: Process scheduled emails every minute (checks cron expressions)
Schedule::command('emails:process-scheduled')
->everyMinute()
->withoutOverlapping();
|