Sagy C
Sagy C

Reputation: 37

Laravel Task scheduling

I'm having some trouble with my scheduling tasks .Well i'm looping several users and i'm scheduling one task at every everyThirtyMinutes func.The problem is that the first task is not finished to run yet and again after 30 minutes it start again i just want to do that if user is not finished to run don't start a new task.

Upvotes: 0

Views: 94

Answers (1)

user5446912
user5446912

Reputation:

You can use ->withoutOverlapping() to make sure that the tasks don't overlap.

$schedule->command('task')->everyThirtyMinutes()->withoutOverlapping();

Upvotes: 2

Related Questions