
Bash Script Locking: Prevent Concurrent Runs with a PID File
- Bash
- Automation
- 18 Aug 2026
- 04 Mins read
Quick Tip Wrap any script that must not run twice at once in a PID-file lock, and a second copy simply exits instead of corrupting your data. The Problem The Problem Cron does not c

Python Async HTTP Requests with aiohttp: Fetch Multiple URLs Concurrently
Quick Tip Reuse one aiohttp session, fan your requests out with asyncio.gather, and cap them with a semaphore to fetch hundreds of URLs in the time one loop would take. The Problem **The