Repository navigation
4.1.0
Added
- Allow before constraint to setup hours:
Scheduler::init('Invoice reminder.')
->recipients($mail = 'zoo@bar.com')
->mailable(
(new InvoiceReminderMailable())->to('foo@bar.com')
)
->hours(1)
->before(now()->addHours(3));The code above will send the email InvoiceReminderMailable to zoo@bar.com 1 hour before now + 3 hours. So basically the email will be sent in 1 hour.