Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kvz/cronlock
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Jun 26, 2012
2 parents d25ab34 + b6a1ce0 commit ea0f9c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -42,7 +42,7 @@ By settings locks, `cronlock` can also prevent overlap in longer-than-expected-r


- Follows locking logic from Redis documentation at http://redis.io/commands/setnx - Follows locking logic from Redis documentation at http://redis.io/commands/setnx
- requires a `bash` with `/dev/tcp` enabled. Older Debian/Ubuntu systems disable `/dev/tcp` - requires a `bash` with `/dev/tcp` enabled. Older Debian/Ubuntu systems disable `/dev/tcp`
- requires `md5` - requires `md5` || `md5sum`
- requires a running redis server that all cron-executors have access to - requires a running redis server that all cron-executors have access to


## Options ## Options
Expand All @@ -58,6 +58,7 @@ to change the behavior of `cronlock`:
- `CRONLOCK_GRACE` determines how long a lock should at least persist. default is 40s: `40`. - `CRONLOCK_GRACE` determines how long a lock should at least persist. default is 40s: `40`.
This is too make sure that if you have a very small job, and clocks aren't in sync, the same job This is too make sure that if you have a very small job, and clocks aren't in sync, the same job
on server2 (slightly behind in time) will just fire right after server1 finished it. on server2 (slightly behind in time) will just fire right after server1 finished it.
I recommend using a grace of at least 30s.
- `CRONLOCK_RELEASE` determines how long a lock can persist at most. acts as a failsafe so there can be no locks that persist forever in case of failure. default is a day: `86400` - `CRONLOCK_RELEASE` determines how long a lock can persist at most. acts as a failsafe so there can be no locks that persist forever in case of failure. default is a day: `86400`
- `CRONLOCK_KEY` a unique key for this command in the global redis instance. default: a hash of cronlock's arguments - `CRONLOCK_KEY` a unique key for this command in the global redis instance. default: a hash of cronlock's arguments
- `CRONLOCK_PREFIX` redis key prefix used by all keys. default: `cronlock.` - `CRONLOCK_PREFIX` redis key prefix used by all keys. default: `cronlock.`
Expand Down

0 comments on commit ea0f9c2

Please sign in to comment.