Sanjay Prajapati
Sanjay Prajapati

Reputation: 359

What will happen if I run cron job that is already running in laravel

I would like to know, what will happen If I have one cron schedule for every 5 minutes, which updates data in system and it takes about 30 mins to complete its process but if the same cron runs again after 5 minutes, will it stop executing already running process and starts from again, leaving half of data not updated?

Any help would be good.

Upvotes: 1

Views: 657

Answers (1)

Abdulla Nilam
Abdulla Nilam

Reputation: 38642

use command

withoutOverlapping();

By default, its 24 hours, and you can set withoutOverlapping(X)

Upvotes: 1

Related Questions