-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from kbond/invokable-service-tasks
Add `AsScheduledTask` attribute
- Loading branch information
Showing
25 changed files
with
586 additions
and
69 deletions.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.yml] | ||
indent_size = 2 |
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
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/build/ | ||
/.php-cs-fixer.cache | ||
/.phpunit.result.cache | ||
/var/ |
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
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
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
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
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 |
---|---|---|
|
@@ -45,7 +45,7 @@ task *output*. | |
|
||
$schedule->addCallback(function () { | ||
// do something | ||
|
||
return 'task output'; | ||
}); | ||
``` | ||
|
@@ -110,7 +110,7 @@ zenstruck_schedule: | |
|
||
```yaml | ||
# config/packages/zenstruck_schedule.yaml | ||
zenstruck_schedule: | ||
tasks: | ||
- task: 'bash:cd %kernel.project_dir% && bin/my-script' | ||
|
@@ -148,10 +148,10 @@ $schedule->addMessage(new MyMessage('argument'), [new DelayStamp(10)]); | |
|
||
```yaml | ||
# config/packages/zenstruck_schedule.yaml | ||
zenstruck_schedule: | ||
messenger: ~ | ||
# optionally configure the message bus (uses "message_bus" by default) | ||
messenger: | ||
message_bus: my_bus | ||
|
@@ -698,7 +698,7 @@ zenstruck_schedule: | |
default_from: [email protected] # exclude only if a "global from" is defined for your application | ||
subject_prefix: "[Acme Inc]" # optional | ||
``` | ||
|
||
3. Failed task emails have the subject `[Scheduled Task Failed] CommandTask: failed | ||
task description` (the subject can be configured). The email body has the following | ||
structure: | ||
|
@@ -728,7 +728,7 @@ zenstruck_schedule: | |
|
||
## Task Output: | ||
|
||
Task's output (if any) | ||
Task's output (if any) | ||
``` | ||
|
||
### Prevent Overlap | ||
|
@@ -763,7 +763,7 @@ zenstruck_schedule: | |
```console | ||
$ composer require symfony/lock | ||
``` | ||
|
||
2. *Optionally* customize the `LockFactory` service in your configuration: | ||
|
||
```yaml | ||
|
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
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
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
Oops, something went wrong.