Skip to main content

Ensure single instance of a command without leaving stale lock files.

Project description

Wrap a command with single to ensure there is at most single instance of the command at a time.

This comes in handy when periodically invoking potentially long-running commands by cron. single avoids the problem of stale lock suffered by lock file approach. Even if the command crashes the lock is cleared.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page