Teams that run scheduled AI jobs
How to stop an automation from doing the same job twice
Save one record for each job so a second attempt can check which emails, tasks or changes already happened.
Published · Updated
On this page
Give every scheduled job one reference number. If the first attempt stops halfway through, look up the same number before trying again. Open the app where the work goes and check what is already there before you create, change or send anything a second time.
Use the same job number when it runs again
Build the ID from the job name, the business period it covers and the destination it serves. A monthly job for the North branch might use branch-handover/north/2026-11. Write that ID to a shared job record before work starts. Let only one attempt own that record at a time, even when two attempts start together. A later attempt can take over the same record once the first has stopped or your job system has safely transferred ownership. A manual restart for November should use the same November ID, even if someone presses the button in December.
Some schedules retry a request after a response is lost, even when the destination received and processed it. Google Cloud Scheduler documents this case and provides a job name and original scheduled time for supported requests. Google Cloud’s guide to deduplicating job requests
Keep a record of changes the job already made
Give each step that creates or changes something its own record under the job ID. When a step starts, save its target and what should happen. When it finishes, save the destination’s confirmation or a link to the completed result. Keep that record somewhere the next attempt can read.
If the first attempt stops with a step in progress, check the destination before repeating it.
- The change is confirmed. Save the result you found and continue to the next step.
- The change is confirmed absent. Check that the first attempt has stopped. Retry with the same step ID if the destination can use it to prevent duplicate work. Check the result again before continuing.
- The result is uncertain. Pause the step and give the operator the original attempt time, target and intended change. If the app can’t prove what happened or safely accept the same ID, the operator needs to decide how to proceed.
Test a job that stops before it sends a reply
In this worked example, a monthly assistant saves the North branch’s handover pack and opens a task for the branch manager. The pack saves successfully. The task system creates task 4821, but the connection drops before the assistant receives the reply.
The next attempt finds the saved pack and looks up the task by the original job ID. It records task 4821 and finishes. The pass condition is one handover pack, one manager task and both links in the job record. Trigger two attempts together. Count the matching packs and tasks in their apps. There should still be one of each, even if both attempts wrote to the job history. Then make the task system unavailable. The assistant should flag the open question and wait for someone to check the task system.
Try this with a test destination before scheduling live changes. Use the Frontier Research lesson on scheduled work to define what a normal run should produce.


