From 64606fefd69ba5c16d6f2abadb06b52f7cbed7b8 Mon Sep 17 00:00:00 2001 From: Richard Aljaste Date: Mon, 8 May 2023 16:13:55 +0300 Subject: [PATCH] Documented the --rest option for queue workers Related PR: https://github.com/laravel/framework/pull/36521#issuecomment-1538188382 --- queues.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/queues.md b/queues.md index 5ea19b01791..5baa4b72111 100644 --- a/queues.md +++ b/queues.md @@ -1552,6 +1552,15 @@ When jobs are available on the queue, the worker will keep processing jobs with php artisan queue:work --sleep=3 ``` + +#### Worker Rest Duration + +In order to override the default behaviour and wait a number of seconds in between jobs, the `rest` option may be used. This is useful in cases where, for example, sending out emails is rate limited by the web hosting service used: + +```shell +php artisan queue:work --rest=5 +``` + #### Resource Considerations