adachsoft / automation
Framework-independent PHP library for validating, scheduling, and executing ordered actions.
Requires
- php: ^8.3
- adachsoft/action-contracts: ^0.1.1
- adachsoft/automation-contracts: ^0.1
- adachsoft/recurrence-contracts: ^0.1
- adachsoft/reference-contracts: ^0.1
- psr/clock: ^1.0
Requires (Dev)
- adachsoft/php-code-style: ^0.7.3
- adachsoft/recurrence: ^0.1
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^13.4
- rector/rector: ^2.8
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
adachsoft/automation is a framework-independent PHP library for managing recurring schedules that execute ordered actions. It provides schedule validation and lifecycle operations, a periodic tick with missed-run policies, at-most-once occurrence markers, optional locking, manual execution, stop conditions, and listeners.
Requirements
- PHP 8.3 or later.
- Implementations of schedule and runtime-state repositories, fired-occurrence storage, recurrence calculation, action execution and authorization, and a PSR-20 clock.
Installation
Install the package with Composer:
composer require adachsoft/automation
The AdachSoft action and recurrence packages provide optional implementations of their contracts. Applications may use other implementations instead.
Usage
Use AutomationFactory to create the schedule service, recurring tick, and manual runner. Call the tick from a worker or cron job at the desired cadence. Provide a shared implementation of ScheduleLockInterface when multiple workers can run concurrently.
See the integration example for a wiring outline.
License
MIT