Deferred task execution

From sammcj/agentic-coding · View interactive version

Deferred task execution is an AI agent skill from the GitHub repository sammcj/agentic-coding. Delays execution of a task until a specified time or after a duration. Use when the user asks to run something later, in X minutes/hours, at a specific time, schedule a command, or defer work to a future point.

How to use this skill

Skill file

Deferred Task Execution

Delays agent work until a user-specified time using a background timer script, then proceeds with the deferred task.

Script Location

~/.claude/skills/deferred-task-execution/scripts/wait-until.sh

Supported Input Formats

The script accepts one argument in either format:

Duration - relative delay from now:

Clock time - specific time of day:

Workflow

Step 1: Confirm the user's intent

Confirm what task to perform and when. Parse their natural language into a wait-until argument:

| User says | Argument |

|-----------|----------|

| "in 30 minutes" | 30m |

| "in an hour" | 1h |

| "in 2 and a half hours" | 2h30m |

| "at 3pm" | 3pm |

| "at 14:30" | 14:30 |

| "at half past 9" | 9:30am |

The script self-handles timezone via the USER_TZ variable defined at the top of wait-until.sh (defaults to Australia/Melbourne). Clock-time arguments are interpreted in that zone regardless of host TZ. Don't ask the user about timezones unless they mention travelling.

Tell the user exactly what will happen and when the timer will fire. Ask them to confirm before starting.

Step 2: Launch the timer in background

Run the wait script using Bash with run_in_background: true:

~/.claude/skills/deferred-task-execution/scripts/wait-until.sh <argument>

Note the task ID from the response -- you need it to cancel.

Step 3: Wait for the timer

Background Bash notifies you when the script exits. Wait for that notification; don't poll.

Step 4: Execute the deferred task

Once the output contains "Timer complete. Proceed with deferred task.", carry out whatever work the user requested.

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.