Skip to content

Commit

Permalink
Add information about environments method
Browse files Browse the repository at this point in the history
This will add information about the `environments` method that allows to limit execution of a scheduled task to a specific environmentf
  • Loading branch information
fetzi authored Oct 8, 2018
1 parent 86aba67 commit 198d817
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ The `skip` method may be seen as the inverse of `when`. If the `skip` method ret

When using chained `when` methods, the scheduled command will only execute if all `when` conditions return `true`.

#### Environment Constraints

The `environments` method may be used to execute tasks only on certain environments. Only if the current environment matches the given environment or the list of environments the task will be executed.

$schedule->command('emails:send')
->daily()
->environments(['staging', 'production']);

<a name="timezones"></a>
### Timezones

Expand Down

0 comments on commit 198d817

Please sign in to comment.