Vincent Warmerdam 4/21/2026

til flock

Read Original

This article discusses a common issue in homelab auto-deployments where cron jobs trigger overlapping builds. The author explains how to use the `flock` command with a lock file and the `-n` (non-blocking) flag to prevent multiple instances of a deploy script from running simultaneously. It also recommends adding a timeout to handle hanging scripts. The pattern is useful for those who prefer pull-based deployments from GitHub over webhooks.

til flock

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet