Overview
Automate your AI assistant with scheduled tasks:
- Daily briefings — Morning summaries and updates
- Reminders — Time-based notifications
- Recurring tasks — Weekly reports, daily check-ins
- Smart scheduling — AI-generated content on a schedule
Basic Scheduled Messages
Using Cron Jobs
Create a script for your scheduled message:
# ~/moltbot-briefing.sh
#!/bin/bash
moltbot message send --to "+1234567890" --text "Good morning! Here's your daily briefing..."
Add to crontab:
crontab -e
# Daily briefing at 8 AM
0 8 * * * ~/moltbot-briefing.sh
# Weekly report on Monday at 9 AM
0 9 * * 1 ~/moltbot-weekly.sh
AI-Generated Scheduled Content
Daily Motivation
# ~/daily-motivation.sh
#!/bin/bash
MESSAGE=$(moltbot ai generate "Generate a short, inspiring motivational quote for today. Keep it under 100 characters.")
moltbot message send --to "+1234567890" --text "$MESSAGE"
Weather Briefing
# ~/weather-briefing.sh
#!/bin/bash
WEATHER=$(curl -s "wttr.in/NewYork?format=3")
moltbot message send --to "+1234567890" --text "☀️ Today's weather: $WEATHER"
News Summary
# ~/news-summary.sh
#!/bin/bash
moltbot message send --to "+1234567890" --text "What are the top 3 news headlines today? Be brief."
Reminder System
Simple Reminders
# Set a reminder for 2 hours from now
moltbot reminder set --in "2h" --to "+1234567890" --text "Time for your meeting!"
# Set a reminder for a specific time
moltbot reminder set --at "14:30" --to "+1234567890" --text "Call the dentist"
# Set a reminder for a specific date
moltbot reminder set --at "2026-02-01 09:00" --to "+1234567890" --text "Happy New Month!"
Recurring Reminders
# Daily reminder at 9 AM
moltbot reminder set --cron "0 9 * * *" --to "+1234567890" --text "Take your vitamins!"
# Weekly reminder on Fridays at 5 PM
moltbot reminder set --cron "0 17 * * 5" --to "+1234567890" --text "Submit your weekly report"
# Monthly reminder on the 1st
moltbot reminder set --cron "0 10 1 * *" --to "+1234567890" --text "Pay rent"
Advanced Scheduling
Multi-Platform Broadcasting
Send to multiple platforms at once:
# ~/broadcast.sh
#!/bin/bash
MESSAGE="$1"
# Send to WhatsApp
moltbot message send --channel whatsapp --to "+1234567890" --text "$MESSAGE"
# Send to Telegram
moltbot message send --channel telegram --to "@username" --text "$MESSAGE"
# Send to Discord
moltbot message send --channel discord --to "#general" --text "$MESSAGE"
Conditional Scheduling
Only send if certain conditions are met:
# ~/conditional-reminder.sh
#!/bin/bash
# Check if it's a weekday
DAY=$(date +%u)
if [ $DAY -lt 6 ]; then
moltbot message send --to "+1234567890" --text "Don't forget your standup meeting!"
fi
Time Zone Aware
# Send at 9 AM in recipient's timezone
TZ="America/New_York" moltbot message send --to "+1234567890" --text "Good morning, East Coast!"
Scheduled AI Tasks
Daily Summary
# ~/daily-summary.sh
#!/bin/bash
# Get yesterday's conversation summary
SUMMARY=$(moltbot history summarize --days 1 --format brief)
moltbot message send --to "+1234567890" --text "📊 Yesterday's summary:\n$SUMMARY"
Weekly Analytics
# ~/weekly-analytics.sh
#!/bin/bash
STATS=$(moltbot stats --days 7 --format text)
moltbot message send --to "+1234567890" --text "📈 This week's stats:\n$STATS"
Using systemd (Linux)
For more reliable scheduling on Linux:
Create Service File
sudo nano /etc/systemd/system/moltbot-briefing.service
[Unit]
Description=Moltbot Daily Briefing
[Service]
Type=oneshot
User=YOUR_USERNAME
ExecStart=/home/YOUR_USERNAME/moltbot-briefing.sh
Create Timer File
sudo nano /etc/systemd/system/moltbot-briefing.timer
[Unit]
Description=Run Moltbot briefing daily
[Timer]
OnCalendar=*-*-* 08:00:00
Persistent=true
[Install]
WantedBy=timers.target
Enable Timer
sudo systemctl enable moltbot-briefing.timer
sudo systemctl start moltbot-briefing.timer
Using launchd (macOS)
Create Plist File
nano ~/Library/LaunchAgents/com.moltbot.briefing.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.moltbot.briefing</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/YOU/moltbot-briefing.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</dict>
</plist>
Load the Job
launchctl load ~/Library/LaunchAgents/com.moltbot.briefing.plist
Best Practices
Do’s
- ✅ Test scheduled messages manually first
- ✅ Use logging to track execution
- ✅ Set up failure notifications
- ✅ Consider recipient’s timezone
- ✅ Keep messages concise
Don’ts
- ❌ Don’t schedule too frequently (annoying)
- ❌ Don’t forget to handle errors
- ❌ Don’t schedule during sleep hours
- ❌ Don’t rely on scheduled messages for critical alerts
Troubleshooting
Messages Not Sending
- Check if gateway is running:
moltbot status - Verify cron job is active:
crontab -l - Check logs:
moltbot logs --tail 50
Wrong Time
- Verify system timezone:
date - Set timezone in script:
TZ="Your/Timezone" - Use UTC for consistency
Script Not Executing
- Check file permissions:
chmod +x script.sh - Use full paths in cron jobs
- Redirect output to log:
>> /tmp/cron.log 2>&1
Next Steps
- Group Chat Bot — Use in groups
- Voice Assistant — Add voice features