Cron Setup
TimeOtter works best when run periodically via cron. This guide explains how to set it up.
How It Works
- TimeOtter fetches your upcoming calendar events
- It creates cron entries for each event
- When an event time arrives, cron executes your configured command
Setting Up Your Crontab
Step 1: Add the Marker Comment
First, add the marker comment to your crontab. This tells TimeOtter where to manage entries:
crontab -eAdd this line at the end:
# custom crons below this can be deleted.Step 2: Add TimeOtter Cron Job
Add a cron entry to run TimeOtter periodically. Place this above the marker comment:
# Run TimeOtter every 30 minutes*/30 * * * * timeotter
# custom crons below this can be deleted.Example Complete Crontab
# Your existing cron jobs0 0 * * * /path/to/backup-script.sh0 9 * * 1 /path/to/weekly-report.sh
# Run TimeOtter every hour0 * * * * timeotter
# custom crons below this can be deleted.# (TimeOtter manages everything below this line)Backup Your Crontab
Before making changes, back up your existing crontab:
crontab -l > ~/crontab-backup.txtTimeOtter also creates automatic backups at the path specified by BackupFile in your config.
Recommended Schedules
| Frequency | Cron Expression | Use Case |
|---|---|---|
| Every 30 min | */30 * * * * | Frequent calendar updates |
| Every hour | 0 * * * * | Standard usage |
| Every 2 hours | 0 */2 * * * | Less frequent updates |
| Every 6 hours | 0 */6 * * * | Minimal resource usage |
Verifying Setup
Check that your crontab is correctly configured:
crontab -lYou should see:
- The TimeOtter cron job (above the marker)
- The marker comment
- Any calendar-generated entries (below the marker)
Troubleshooting
TimeOtter Not Running
Check cron logs:
grep CRON /var/log/syslogCommand Not Found
Ensure the full path to timeotter is used if not in PATH:
0 * * * * /home/user/go/bin/timeotterNo Events Appearing
- Verify your config file is correct
- Check that you have upcoming calendar events
- Run
timeottermanually to see any errors