Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

noblemfd's avatar

Laravel Cron Job Schedule for 2 Days to Resumption Date

I am using Laravel-5.8 for a project.

I have a date field called resumption_date

How do I write a command to schedule Laravel Cron Job a day and two days to resumption_date?

Thank you

0 likes
1 reply
bugsysha's avatar

You make a command and schedule it to run at least every day where you check which records in the database have resumption date coming tomorrow or in two days.

Model::query()->whereBetween('resumption_date', [$tomorrowStartOfTheDay, $dayAfterTomorrowEndOfTheDay])->get();

Please or to participate in this conversation.