stellarwp / shepherd
A library for offloading tasks to background processes.
Requires
- php: >=7.4
- psr/log: ^1.1
- stellarwp/db: ^1.1
- stellarwp/schema: ^2.0
- woocommerce/action-scheduler: 3.9.2
Requires (Dev)
- codeception/module-asserts: ^1.3
- codeception/module-cli: ^1.1
- codeception/module-db: ^1.2
- codeception/module-filesystem: ^1.0
- codeception/module-phpbrowser: ^1.0
- codeception/module-rest: ^2.0
- codeception/module-webdriver: ^1.4
- codeception/util-universalframework: ^1.0
- lucatume/codeception-snapshot-assertions: ^0.4.0
- lucatume/di52: ^4.0
- lucatume/wp-browser: ^3.5.7
- phpcompatibility/phpcompatibility-wp: ^2.1
- slope-it/clock-mock: ^0.4.0
- stellarwp/coding-standards: ^2.1
- szepeviktor/phpstan-wordpress: ^2.0
This package is auto-updated.
Last update: 2025-07-14 15:37:56 UTC
README
Shepherd is a lightweight and powerful background processing library for WordPress, built on top of Action Scheduler. It provides a simple, fluent API for defining and dispatching asynchronous tasks, with built-in support for retries, debouncing, and logging.
Features
- Simple, Fluent API: A straightforward way to define and dispatch background tasks.
- Action Scheduler Integration: Leverages the reliability of Action Scheduler for task processing.
- Automatic Retries: Configurable automatic retries for failed tasks.
- Debouncing: Prevent tasks from running too frequently.
- Logging: Built-in database logging for task lifecycle events.
- Included Tasks: Comes with a ready-to-use
Email
task.
Getting Started
For a guide on how to install Shepherd and get started with creating and dispatching your first task, please see our Getting Started guide.
Advanced Usage
For more detailed information on advanced features like task retries, debouncing, unique tasks, and logging, please refer to our Advanced Usage guide.
Built-in Tasks
Shepherd comes with a set of pre-packaged tasks to handle common background operations. For more information, please see our Tasks guide.
Contributing
We welcome contributions! Please see our contributing guidelines for more information. (TODO: Add a CONTRIBUTING.md file)