drieschel / batches
A lightweight php lib for creating scheduled batch jobs and integrating them easily in php applications
0.1.0
2015-06-07 15:01 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-02-27 06:34:15 UTC
README
A lightweight php lib for creating scheduled batch jobs and integrating them easily in php applications. Jobs from a batch will be executed everytime when the execution time is reached or exceeded. That is a very important detail, because php is running request based and not like a daemon.
- You have to create your own Job classes. They only need to implement the Job interface from this repository.
- Instantiate a Batch object with a unique name and the directory where the run files has to be stored.
- Set the executionPlan by method. Its cronjob notation like.
- Instantiate the Job(s) you need and add them to the Batch object.
- Call the run method from the Batch object.