Loading...
Loading...
This skill should be used when the user asks to "run npm test after 30 minutes", "git commit after 1 hour", "wait 2h then deploy", "sleep 45m and run build", "after 10m run prettier", or provides a duration followed by a shell command to execute later.
npx skill4agent add paulrberg/agent-skills delayed-command30s5m1h1h30m| Format | Example | Meaning |
|---|---|---|
| | 30 seconds |
| | 5 minutes |
| | 1 hour |
| | 1 hour 30 minutes |
| | 1 hour 5 min 30 s |
hmshours * 3600 + minutes * 60 + secondsduration="$1"
seconds=0
# Extract hours
if [[ $duration =~ ([0-9]+)h ]]; then
seconds=$((seconds + ${BASH_REMATCH[1]} * 3600))
fi
# Extract minutes
if [[ $duration =~ ([0-9]+)m ]]; then
seconds=$((seconds + ${BASH_REMATCH[1]} * 60))
fi
# Extract seconds
if [[ $duration =~ ([0-9]+)s ]]; then
seconds=$((seconds + ${BASH_REMATCH[1]}))
fisleep <seconds> && <command>timeout(seconds + 60) * 1000run_in_background: truesleep <seconds> && <command>/delayed-command 5m npm testsleep 300 && npm test/delayed-command 1h git commit -m "auto-commit"sleep 3600 && git commit -m "auto-commit"/delayed-command 1h30m ./deploy.shsleep 5400 && ./deploy.sh| Error | Response |
|---|---|
| Invalid duration format | Show supported formats and examples |
| Missing command argument | Prompt for the command to execute |
| Command not found | Report error after delay completes |
| Duration exceeds 24h | Warn user and suggest alternative (cron, at) |