diff --git a/src/Illuminate/Console/Scheduling/PendingEventAttributes.php b/src/Illuminate/Console/Scheduling/PendingEventAttributes.php index 92cc6749e662..13f4210afb3b 100644 --- a/src/Illuminate/Console/Scheduling/PendingEventAttributes.php +++ b/src/Illuminate/Console/Scheduling/PendingEventAttributes.php @@ -17,6 +17,23 @@ public function __construct( ) { } + /** + * Do not allow the event to overlap each other. + * + * The expiration time of the underlying cache lock may be specified in minutes. + * + * @param int $expiresAt + * @return $this + */ + public function withoutOverlapping($expiresAt = 1440) + { + $this->withoutOverlapping = true; + + $this->expiresAt = $expiresAt; + + return $this; + } + /** * Merge the current attributes into the given event. */