Overview
The cron system supports:- One-time reminders - “Remind me in 10 minutes”
- Recurring tasks - “Remind me every 2 hours”
- Complex schedules - “Remind me at 9am daily” (cron expressions)
- Command execution - Run shell commands on schedule
Tool Usage
The agent uses thecron tool automatically when you ask for reminders or scheduled tasks.
Parameters
Usage Examples
One-time Reminders
User: “Remind me in 10 minutes to check the server” Agent calls:Recurring Tasks
User: “Remind me every 2 hours to take a break” Agent calls:Cron Expressions
User: “Remind me to review emails at 9am every weekday” Agent calls:Command Execution
User: “Check disk usage every hour” Agent calls:df -h and reports output.
Managing Jobs
List all jobs:Cron Expression Format
Cron expressions use the standard 5-field format:Common Examples
Special Characters
*- Any value,- Value list (e.g.,1,15for 1st and 15th)-- Range (e.g.,1-5for Monday-Friday)/- Step values (e.g.,*/15for every 15 minutes)
CLI Commands
You can also manage cron jobs via CLI:List Jobs
Add Job via CLI
Storage
Cron jobs are stored in your workspace:Job Format
Configuration
Configure execution timeout in~/.picoclaw/config.json:
Options
How It Works
Schedule Types
The cron service supports three schedule types:1. At (One-time)
Triggers once at a specific Unix timestamp:2. Every (Recurring Interval)
Triggers at regular intervals:3. Cron (Expression-based)
Triggers based on cron expression:Execution Flow
Command Execution
When a job has acommand field:
- Command executed via
ExecTool(respects workspace restrictions) - Output captured
- Result sent to channel/chat specified in job
- Execution timeout enforced (default: 5 minutes)
Delivery Modes
Direct delivery (deliver: true):
- Message sent directly to channel
- No agent processing
- Fast and simple
deliver: false):
- Message processed by agent
- Agent can use tools, access context
- For complex tasks requiring decision-making
Session Context
When creating jobs, the cron tool captures current session context:- Channel: Where the job was created (telegram, discord, cli, etc.)
- Chat ID: Which chat/user requested the job
Best Practices
Choosing Schedule Type
✅ Useat_seconds for:
- One-time reminders
- Temporary schedules
- Countdown timers
every_seconds for:
- Simple recurring tasks
- Regular intervals
- Monitoring checks
cron_expr for:
- Specific times (“9am daily”)
- Complex schedules (“weekdays only”)
- Calendar-based triggers
Performance Considerations
- Avoid very frequent jobs (< 1 minute intervals)
- Use
deliver: truefor simple notifications - Keep command execution under timeout limit
- Consider using heartbeat for background tasks instead
Security
Commands execute with same restrictions as agent:- Respects
restrict_to_workspacesetting - Blocked dangerous commands (rm -rf, etc.)
- Timeout enforcement prevents runaway processes
Troubleshooting
Job Not Triggering
- Check job is enabled:
-
Verify schedule:
- For
at_seconds: Check time is in future - For
every_seconds: Ensure interval is reasonable - For
cron_expr: Validate expression format
- For
- Check logs:
Command Not Executing
-
Verify command field is set:
- Commands must have
commandfield in payload deliveris automatically set to false for commands
- Commands must have
-
Check timeout:
- Default: 5 minutes
- Increase if command takes longer
-
Verify workspace restrictions:
- Command paths must be within workspace if restricted
- Check
restrict_to_workspacesetting
Wrong Delivery Channel
-
Check session context:
- Jobs remember channel/chat where created
- Create new job from correct channel
-
Manual override:
- Edit job file manually if needed
- Located in
~/.picoclaw/workspace/cron/
Differences from Heartbeat
Choose cron for:
- Specific time-based reminders
- One-time notifications
- User-requested schedules
- Continuous background monitoring
- Regular health checks
- Automated maintenance tasks
Related Features
- Heartbeat - Periodic background tasks
- Spawn Tool - Async subagent execution
- Exec Tool - Command execution