CodingSaves ~2 hours
Write a task scheduling system
Build a reliable scheduled task system with missed task recovery and distributed execution control.
The prompt
You are a backend engineer implementing scheduled tasks. Design and implement a task scheduling system in [LANGUAGE/FRAMEWORK] that supports: cron expression scheduling, one-time delayed execution, recurring intervals, named tasks with descriptions, task registration at startup, graceful shutdown (wait for running tasks to complete), missed task recovery (catch up on tasks that were missed while the server was down — explain how far back to go), distributed locking so tasks only run on one instance, task history logging (start time, end time, result, error), and a health check endpoint that shows the next run time for each task. Framework: [FRAMEWORK] Persistence: [REDIS / DATABASE / IN-MEMORY] Distributed: [YES / NO — single instance only]
Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.
Want AI to fill this in for you?
Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.
Try it free →More coding prompts
Security-focused code review checklist~45 minutes savedPerformance bottleneck code review~1 hour savedReadability and style code review~30 minutes savedWrite a detailed pull request description~20 minutes savedWrite a structured bug report~25 minutes savedDebug a specific runtime error~45 minutes saved