Timer
You can set timers and alarms that run in the background. Use the DevClaw scheduler (cron_add) for precise time-based alerts or bash sleep for quick countdowns.
Quick timers (using sleep)
bash
# Simple countdown — sends a message when done sleep 300 && echo "⏰ 5-minute timer finished!" # With a custom message sleep 600 && echo "⏰ Time to check the oven!" # 30 seconds sleep 30 && echo "⏰ 30 seconds! Time's up."
Important: Use
bash background:trueso the timer runs in the background without blocking.
Using the scheduler (for precise times)
bash
# Reminder at a specific time (one-shot cron) # Format: minute hour day month weekday cron_add --id "reminder-123" --schedule "30 14 * * *" --payload "Reminder: meeting at 3pm" # Remove after it fires cron_remove --id "reminder-123"
Pomodoro technique
bash
# Work session (25 min) sleep 1500 && echo "🍅 Pomodoro finished! Time for a 5-minute break." # Short break (5 min) sleep 300 && echo "🔔 Break's over! Back to work." # Long break (15 min, after 4 pomodoros) sleep 900 && echo "☕ Long break over! Ready for another cycle?"
Time conversion reference
| Input | Seconds |
|---|---|
| 30s | 30 |
| 1m | 60 |
| 5m | 300 |
| 10m | 600 |
| 15m | 900 |
| 25m | 1500 |
| 30m | 1800 |
| 1h | 3600 |
| 2h | 7200 |
Tips
- •Always run timers in background mode so the user can keep chatting.
- •Convert natural language times: "5 minutes" →
sleep 300, "half hour" →sleep 1800. - •For recurring timers (e.g., "every 30 minutes"), use the scheduler with cron expressions.
- •When a timer completes, notify the user with a clear message including the original purpose.
- •For Pomodoro, track the cycle number if the user wants a full session.
Triggers
timer, set a timer, alarm, set alarm, pomodoro, countdown, temporizador, alarme, cronômetro, me avise em, lembrete em