The published configuration file allows you to manage log retention, date formats, and custom models.
Key configuration options include:
delete_log_items_older_than_days: Number of days to keep log items before they are eligible for pruning.date_format: The date format used in CLI command outputs.models: Allows you to swap the default MonitoredScheduledTask and MonitoredScheduledTaskLogItem models with your own implementations.oh_dear: A comprehensive array of settings for syncing your schedule with Oh Dear, including api_token, monitor_id, queue, and grace_time_in_minutes (the amount of minutes a task can run before being considered late).
return [
'delete_log_items_older_than_days' => 30,
'date_format' => 'Y-m-d H:i:s',
'models' => [
'monitored_scheduled_task' => Spatie\ScheduleMonitor\Models\MonitoredScheduledTask::class,
'monitored_scheduled_log_item' => Spatie\ScheduleMonitor\Models\MonitoredScheduledTaskLogItem::class,
],
'oh_dear' => [
'api_token' => env('OH_DEAR_API_TOKEN', ''),
'monitor_id' => env('OH_DEAR_MONITOR_ID'),
'queue' => env('OH_DEAR_QUEUE'),
'ping_oh_dear_job' => Spatie\ScheduleMonitor\Jobs\PingOhDearJob::class,
'retry_job_for_minutes' => 10,
'silence_ping_oh_dear_job_in_horizon' => true,
'send_starting_ping' => env('OH_DEAR_SEND_STARTING_PING', false),
'grace_time_in_minutes' => 5,
'endpoint_url' => env('OH_DEAR_PING_ENDPOINT_URL'),
'api_url' => env('OH_DEAR_API_URL', 'https://ohdear.app/api/'),
'retry_delay_ms' => env('OH_DEAR_RETRY_DELAY_MS', 10_000),
'debug_logging' => env('OH_DEAR_DEBUG_LOGGING', false),
],
];