loganhenson/cronlock

There is no license information available for the latest version (v1.0.0) of this package.

Load balanced cron jobs. Backed by Predis.

v1.0.0 2016-06-20 20:17 UTC

This package is auto-updated.

Last update: 2024-11-17 06:18:25 UTC


README

Load balanced cron jobs. Backed by Predis.

install

composer require loganhenson/cronlock

sample usage

// 5 minutes after job, it will release the lock
$CronLock = new CronLock(new Client());

// a nice key might be `__CLASS__ . __METHOD__`
$CronLock->cron('some unique key for the job', function () {
	//do some cron stuff
});

License

MIT

Inspiration / Credit to

https://github.com/AlexDisler/MutexLock