Skip to content

Commit

Permalink
Update releases.md
Browse files Browse the repository at this point in the history
  • Loading branch information
laurencei authored Feb 10, 2018
1 parent eb3550a commit 3670175
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ In addition, it is now easier to customize existing log channels using the loggi
If your application is running on multiple servers, you may now limit a scheduled job to only execute on a single server. For instance, assume you have a scheduled task that generates a new report every Friday night. If the task scheduler is running on three worker servers, the scheduled task will run on all three servers and generate the report three times. Not good!

To indicate that the task should run on only one server, you may use the `onOneServer` method when defining the scheduled task. The first server to obtain the task will secure an atomic lock on the job to prevent other servers from running the same task at the same time:
To indicate that the task should run on only one server, you may use the `onOneServer` method when defining the scheduled task. The first server to obtain the task will secure an atomic lock on the job to prevent other servers from running the same task for that cron cycle:

$schedule->command('report:generate')
->fridays()
->at('17:00')
->onOneServer();
->fridays()
->at('17:00')
->onOneServer();

### Dynamic Rate Limiting

Expand Down

0 comments on commit 3670175

Please sign in to comment.