DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to stop overlapping cron jobs with flock and timeouts with Braxis Blueprint

Wrap cron jobs in a single-instance lock with a timeout so a slow run cannot pile up duplicates.

Short answer: Read cronwrap.sh to see the flock-based single-instance guard and timeout kill; then make the script executable with chmod +x cronwrap.sh; Change one crontab entry to call your job through cronwrap.sh. All steps.

Who it is forA sysadmin or developer running many cron jobs on one server who has seen duplicate processes stack up and hog resources.

The problemA cron job that runs longer than its interval starts a second copy, and the copies can cascade and lock up the database.

The outcomeEach scheduled job runs as a single instance and is killed if it exceeds its time limit.

What you need first

  • Python installed
  • A Linux shell with cron for the cronwrap.sh and backup.sh patterns
  • Accounts with the free-tier LLM providers the README lists (Groq, NVIDIA NIM, Gemini, Mistral, Zhipu, OpenRouter :free, or local Ollama), with your own keys
  • A resume file for the job-hunt machine
  • Object storage (the README uses an OCI bucket) if you want the offsite backup copy

Steps

  1. Read cronwrap.sh to see the flock-based single-instance guard and timeout kill.
  2. Make the script executable with chmod +x cronwrap.sh. (inferred, check the README)
  3. Change one crontab entry to call your job through cronwrap.sh. (inferred, check the README)
  4. Start a long-running test job twice and confirm the second copy does not run. (inferred, check the README)
  5. Check the logs to confirm the timeout kills a job that runs too long.

Prompt for your agent

In the BraxisAI/braxis-blueprint repo, read cronwrap.sh and wrap the job at <job-command> in a crontab entry. Expected output: a crontab line that calls the job through cronwrap.sh. Verify by launching the job twice and confirming only one instance runs.

Caveat. The README names cronwrap.sh and its flock and timeout behavior but does not document its arguments, so the crontab line must be checked against the script.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for BraxisAI/braxis-blueprint and "Stop overlapping cron jobs with flock and timeouts"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer