Browse Consulting Blog Login / Sign Up
← Back to Blog
March 5, 2026 · 7 min read

Cron Jobs Are Your Agent's Heartbeat

The most useful agents are not the ones you interact with. They are the ones that run while you are asleep, while you are in meetings, while you are focused on something else entirely. They check things, summarize things, flag things, and put the results where you will find them. The technology that makes this possible is not new. It is cron.

What Cron Gives You

Cron is a job scheduler built into every Unix-based system, including macOS and Linux. It runs commands on a schedule you define. That is it. No daemon to install, no service to configure, no infrastructure to manage.

For agent workflows, cron provides three things that matter:

Example Cron Patterns for Agents

Here are practical agent schedules that work well in production:

Morning Research Brief (6:00 AM Daily)

0 6 * * * /usr/local/bin/agent-research --topics "ai,startups" --output ~/briefs/$(date +\%Y-\%m-\%d).md

The agent scans your configured sources, pulls relevant articles and updates, and writes a markdown summary to your briefs folder. By the time you sit down with coffee, your daily briefing is waiting.

Hourly Uptime Monitoring

0 * * * * /usr/local/bin/agent-monitor --urls ~/config/watch-urls.txt --alert slack

Every hour, the agent checks your list of URLs, verifies they return 200 status codes, measures response times, and posts to Slack if anything is down or slow. Simple, effective, and it replaces a paid monitoring service.

Weekly Report Generation (Sunday 8 PM)

0 20 * * 0 /usr/local/bin/agent-report --source ~/logs/ --period 7d --output ~/reports/week-$(date +\%U).md

The agent reads your daily logs from the past week, synthesizes them into a weekly summary, highlights completed tasks, flags blockers, and estimates progress against goals. This is the report you never want to write manually.

Git Repository Digest (Every Weekday at 9 AM)

0 9 * * 1-5 /usr/local/bin/agent-git-digest --repos ~/projects/ --since yesterday --output ~/digests/$(date +\%Y-\%m-\%d).md

The agent reviews commits across all your repositories from the previous day, summarizes changes, and flags anything that looks unusual, like large diffs, deleted files, or changes to critical paths.

Setting Up Agent Cron Jobs

The setup is straightforward on both macOS and Linux. Open your crontab for editing:

crontab -e

Add your job using the standard five-field format:

# minute  hour  day-of-month  month  day-of-week  command
# ------  ----  ------------  -----  -----------  -------
  30      8     *             *      1-5          /path/to/your/agent-script.sh

A few things to get right from the start:

Error Handling and Logging

Cron jobs fail silently by default. If your agent crashes at 3 AM, you will not know unless you set up logging. Always redirect output:

0 6 * * * /path/to/agent.sh >> /var/log/agent-research.log 2>&1

For more robust setups, add these to your wrapper script:

Reactive vs. Proactive Agents

Most people build reactive agents: you ask a question, the agent answers. You give a task, the agent executes. The agent does nothing unless prompted.

Cron turns agents proactive. A proactive agent does not wait for instructions. It operates on a schedule, performing tasks you have predefined, surfacing information you need before you ask for it.

The difference is significant:

The most effective agent setups combine both. You interact with agents reactively during your working hours and rely on cron-scheduled proactive agents to cover everything else. The cron jobs are the heartbeat: steady, reliable, always running. They are what turn a collection of AI tools into an actual system.

An agent you have to remember to run is just a fancy script. An agent on a schedule is infrastructure.

Get production-ready cron templates for every agent pattern.

Get the Cron Toolkit →