Monitor cron jobs in Laravel
Integrate WatchCat with Laravel's task scheduler to get alerted when scheduled commands miss or fail.
Laravel's task scheduler runs all scheduled commands through a single cron entry. If the scheduler process itself dies, or if a specific command throws an exception, nothing in Laravel tells you. WatchCat fills that gap by expecting a ping after each command runs.
Step 1 — create a cron monitor
In WatchCat, go to Cron monitors → New monitor. Set the schedule to match your command's frequency and add a grace period of a few minutes to account for queue delay or slow boot times. Copy the ping URL — you'll need it in the next step.
Step 2 — ping after the command runs
Laravel's scheduler has built-in ping methods. Add thenPing() to
any scheduled command and it will send a GET request to your WatchCat ping
URL after a successful run.
routes/console.php (Laravel 11+)
use Illuminate\Support\Facades\Schedule; Schedule::command('invoices:send') ->daily() ->thenPing('https://watchcat.io/p/cron/YOUR_TOKEN');
app/Console/Kernel.php (Laravel 10 and earlier)
protected function schedule(Schedule $schedule): void { $schedule->command('invoices:send') ->daily() ->thenPing('https://watchcat.io/p/cron/YOUR_TOKEN'); }
thenPing() only fires when the command exits successfully.
To also detect commands that exit with an error, use
pingOnFailure() pointing to the /fail endpoint:
Schedule::command('invoices:send') ->daily() ->thenPing('https://watchcat.io/p/cron/YOUR_TOKEN') ->pingOnFailure('https://watchcat.io/p/cron/YOUR_TOKEN/fail');
Track start and end
For long-running commands, use pingBefore() and thenPing() together.
This lets WatchCat detect commands that started but never finished.
Schedule::command('reports:generate') ->hourly() ->pingBefore('https://watchcat.io/p/cron/YOUR_TOKEN/start') ->thenPing('https://watchcat.io/p/cron/YOUR_TOKEN/end') ->pingOnFailure('https://watchcat.io/p/cron/YOUR_TOKEN/fail');
Step 3 — verify the system cron entry
Laravel's scheduler only runs if the system cron calls artisan schedule:run
every minute. Confirm the entry exists on your server:
crontab -l
You should see a line like:
* * * * * cd /var/www/myapp && php artisan schedule:run >> /dev/null 2>&1
If this entry is missing, your scheduled commands never run — and no ping will ever reach WatchCat.
Recommended settings
Start monitoring in minutes
Free plan available. No credit card required.