Add background tasks and cron cookbook recipe#474
Open
samdark wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new cookbook recipe describing how to run Yii console commands reliably as background tasks via cron or systemd, and exposes it in the cookbook navigation (both in-page index and VitePress sidebar).
Changes:
- Added a new cookbook article covering idempotent console commands, locking, cron/systemd setup, logging, and exit codes.
- Linked the new article from the cookbook index page.
- Added the new article to the VitePress cookbook sidebar navigation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/cookbook/index.md | Adds the new recipe to the cookbook index list. |
| src/cookbook/background-tasks-and-cron.md | Introduces the new background tasks/cron/systemd recipe content and examples. |
| src/.vitepress/config.js | Adds the new recipe to the VitePress cookbook sidebar navigation. |
Comment on lines
+189
to
+190
| For long-running commands, configure logging so records are flushed promptly. The logging guide explains | ||
| [flush and export intervals](../guide/runtime/logging.md#flushing-and-exporting-messages). |
| WantedBy=timers.target | ||
| ``` | ||
|
|
||
| Systemd records stdout, stderr, and the exit code in the journal: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a cookbook article for running Yii console commands as background tasks from cron or systemd, including lock files, logging, exit codes, and multi-server locking notes. Updates both cookbook navigation locations.
Verification: