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

marcoboom's avatar

Schedule every 5 minutes on thursdays

I created a schedule task for an artisan command which I want to run only on thursdays every 5 minutes.

The code looks like this:

$schedule->command('email:subscriptions')->thursdays()->everyFiveMinutes();

It looks like that the thursdays() method will be ignored because the command runs also on other days then thursday.

Does someone knows how to solve this?

Second question: Does someone know how i create a task wich runs every 5 minutes only on monday between 15:00 and 16:00?

0 likes
5 replies
Snapey's avatar

every 5 minutes on day 4

$schedule->command('email:subscriptions')->cron('*/5 * * * 4');
1 like
Snapey's avatar

Bonus points

should be between 3pm and 4pm on a monday, at 5 minute intervals

$schedule->command('email:subscriptions')->cron('*/5 15 * * 1');

asdasdsa's avatar
Level 6

It may that you forgot the weekly clause?

$schedule->command('email:subscriptions')->weekly()->thursdays()->everyFiveMinutes();
ali2535's avatar

I have a problem. my user creates a command at 10:50 for example and want send a message every 30 minutes. so next message should send to him at 11:20 but laravel scheduler send it at 11 and then 11:30 it starts from 0 time . i want to start from the time that user creates it. how should i handle it?

1 like
Snapey's avatar

@ali2535 You have to check every minute to see if there are any messages to send according to the time set on the user's record.

Please or to participate in this conversation.