Skip to content

Conversation

cleptric
Copy link
Member

This adds support for our new Cron Monitors feature, to monitor Laravel's Scheduled Tasks.

<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('emails:send')
            ->everyHour()
            ->sentryMonitor(env('MONITOR_SLUG'));
    }
}

Needs getsentry/sentry-php#1467 to be merged and released first.

Closes #628

@cleptric cleptric self-assigned this Mar 14, 2023
@cleptric cleptric changed the title feat: Add support for Cron Monitoring feat: Add support for Scheduled Tasks monitoring Mar 14, 2023
@cleptric cleptric requested a review from stayallive March 14, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled task monitoring

3 participants