Skip to main content

"Black Friday" Discount! Only until December 1st: 50% off all membership plans!

Read more here
Quick Tip

Specify what to do if a scheduled task fails or succeeds

You can specify what to do if a scheduled task fails or succeeds.

$schedule->command('emails:send')
->daily()
->onSuccess(function () {
// The task succeeded
})
->onFailure(function () {
// The task failed
});

Tip given by @cosmeescobedo

Enjoyed This Tip?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.