Cron - Reminders for Agents
Schedule a reminder that will be delivered back to YOU (the agent), not the user.
How it works
- You figure out HOW to receive the reminder (you know your environment)
- You pass that as
--delivercommand - System
at(one-time) orcrontab(recurring) executes your command - You receive the reminder as input and decide what to do
Usage
# One-time (uses system `at`)
lp-cron add "Check test results" --in "1h" --deliver "YOUR_COMMAND"
# Recurring (uses system crontab)
lp-cron add "Daily standup" --cron "0 10 * * *" --deliver "YOUR_COMMAND"
Your Job: Figure Out Delivery
Provide a command that injects $MSG into YOUR input/context.
If you're in tmux (most common)
# Find your pane
PANE=$(tmux display-message -p '#{session_name}:#{window_index}.#{pane_index}')
# Use this delivery command (sleep 1 is important!)
lp-cron add "Check tests" --in "1h" \
--deliver "tmux send-keys -t $PANE '\$MSG' && sleep 1 && tmux send-keys -t $PANE Enter"
Important: The sleep 1 before Enter is critical for reliable delivery.
Other environments
Figure out how to inject text into your stdin/context and use that command.
Commands
| Command | Description |
|---|---|
lp-cron add TEXT --in TIME --deliver CMD |
One-time reminder |
lp-cron add TEXT --cron EXPR --deliver CMD |
Recurring reminder |
lp-cron list |
Show scheduled jobs |
lp-cron remove ID |
Cancel a job |
lp-cron run ID |
Trigger immediately (test) |
Time Formats
--in (one-time):
5m- 5 minutes1h- 1 hour2d- 2 days1h30m- 1 hour 30 minutes
--cron (recurring):
0 9 * * *- every day at 9am0 10 * * 1- every Monday at 10am*/15 * * * *- every 15 minutes
Requirements
atfor one-time:sudo apt install at && sudo systemctl enable --now atdcronfor recurring (usually pre-installed)
Example Flow
# You want a reminder in 1 hour
PANE=$(tmux display-message -p '#{session_name}:#{window_index}.#{pane_index}')
lp-cron add "Time to check if tests passed" --in "1h" \
--deliver "tmux send-keys -t $PANE '\$MSG' && sleep 1 && tmux send-keys -t $PANE Enter"
# ... 1 hour later ...
# You receive: [Reminder] Time to check if tests passed
# Now you decide: check tests, respond to user, or ignore