call(function () { for ($i = 0; $i < 6; $i++) { \Illuminate\Support\Facades\Artisan::call('prices:tick'); if ($i < 5) { sleep(10); } } })->everyMinute()->name('prices_tick_10s')->withoutOverlapping(); $schedule->command('prices:refresh-zaarbox') ->everyThirtyMinutes() ->name('refresh_zaarbox_prices') ->withoutOverlapping(); // پاک‌سازی و downsample تاریخچه — ساعت ۱۲ شب $schedule->command('prices:prune') ->dailyAt('00:00') ->name('prune_price_snapshots'); } protected function commands() { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }