jbroudou / cronlock
Installs: 5 455
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2019-07-29 02:26:48 UTC
README
A simple ZF2 module that provides locking functionality for cron type console actions.
To install add the following to your project's composer.json
"jbroudou/cronlock": "dev-master"
To enable locking functionality of a console action set the cronLock parameter of the route's default options. e.g.
'my-end-point' => array(
'options' => array(
'route' => 'my-end-point',
'defaults' => array(
'controller' => 'Project\Controller\Cron',
'action' => 'runCron',
'cronLock' => true,
)
)
)
Set the directory where lock files will be created by specifying a cronLockDir config in your project's auto load config. If not set, the module will default to the /tmp directory.