comment(Inspiring::quote()); })->purpose('Display an inspiring quote'); Schedule::command(RefreshAllAssetPrices::class) ->weekdays() ->at('14:00') ->at('22:00'); Schedule::call(function () { // 找出所有有綁定 Google Refresh Token 的使用者 $users = User::whereNotNull('google_refresh_token')->get(); foreach ($users as $user) { // 分別派發非同步任務去排隊抓信,不塞車 FetchAndParseGmailInvoices::dispatch($user); } }) ->weekdays() ->at('14:00') ->at('22:00');