resolveUsing(function ($value, MonitoredScheduledTask $model): bool { $previous = CarbonImmutable::instance( (new CronExpression($model->cron_expression))->getPreviousRunDate(timeZone: $this->scheduleTimezone()) ); return $previous->lessThanOrEqualTo($model->last_started_at); }), Text::make('Name') ->sortable(), Text::make('Cron Expression') ->resolveUsing(function (string $cron): string { $readable = CronTranslator::translate($cron, 'en', true); $next = CarbonImmutable::instance( (new CronExpression($cron))->getNextRunDate(timeZone: $this->scheduleTimezone()) ); return << {$cron} {$readable}

HTML; }) ->textAlign('right') ->asHtml(), DateTime::make('Last Started At') ->sortable() ->textAlign('right'), DateTime::make('Last Finished At') ->sortable() ->textAlign('right'), DateTime::make('Last Skipped At') ->sortable() ->textAlign('right'), DateTime::make('Last Failed At') ->sortable() ->textAlign('right'), ]; } protected function scheduleTimezone(): string { return config('app.schedule_timezone', config('app.timezone')); } }