-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
772ba86
commit ffabefa
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,40 @@ Then add to your crontab | |
|
||
And you are ready to go. | ||
|
||
### Config | ||
You can pass to the Scheduler constructor an array with your global config for the jobs | ||
|
||
The only supported configuration until now is the sender email address when sending the result of a job execution | ||
|
||
```php | ||
... | ||
$config = [ | ||
'emailFrom' => '[email protected]' | ||
]; | ||
|
||
$scheduler = new Scheduler($config); | ||
... | ||
``` | ||
|
||
You can also switch configuration on a per job basis or for a group of jobs | ||
|
||
```php | ||
... | ||
$config1 = [...]; | ||
$config2 = [...]; | ||
$scheduler = new Scheduler(); | ||
|
||
$scheduler->useConfig($config1)->php(...).... | ||
|
||
$scheduler->useConfig($config2); | ||
|
||
$scheduler->raw(...).... | ||
$scheduler->call(...).... | ||
|
||
$scheduler->useConfig($config1); | ||
... | ||
``` | ||
|
||
### Jobs execution order | ||
The jobs that are due to run are being ordered by their execution: jobs that can run in **background** will be executed **first** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters