Skip to content
Home

/

Glossary

/

Infrastructure

/

Cron Job

Infrastructure

3 min read

What is Cron Job?

A cron job is a time-based task scheduler in Unix-like systems that automatically runs scripts or commands at specified intervals, such as every hour, daily, or on specific days of the week.

What is a Cron Job?

A cron job is a scheduled task that runs automatically at predefined times or intervals on Unix-like operating systems. The name comes from the Greek word "chronos" (time) and the cron daemon, a background process that reads a schedule table called a crontab and executes commands accordingly.

Cron Expression Syntax

Cron schedules are defined using a five-field expression:

```

┌───────────── minute (0-59)

│ ┌───────────── hour (0-23)

│ │ ┌───────────── day of month (1-31)

│ │ │ ┌───────────── month (1-12)

│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)

│ │ │ │ │

* * * * *

```

Common examples:

  • 0 9 * * 1-5 — Every weekday at 9:00 AM
  • */15 * * * * — Every 15 minutes
  • 0 0 1 * * — First day of every month at midnight
  • 0 */6 * * * — Every 6 hours
  • Cron Jobs in Automation

    Cron jobs are the backbone of scheduled automation. Common uses include:

  • Data collection — Scraping prices, inventory levels, or news articles at regular intervals.
  • Report generation — Compiling daily sales summaries or weekly analytics reports.
  • Database maintenance — Running cleanup queries, backups, or data archival nightly.
  • File synchronization — Periodically syncing files between servers or cloud storage.
  • Health checks — Monitoring website uptime or API availability every few minutes.
  • Limitations of Traditional Cron

    While cron is powerful, it has significant limitations for modern automation:

  • No built-in error handling — If a cron job fails, there is no automatic retry or alert unless you build it yourself.
  • No dependency management — Cron cannot express "run task B after task A completes." Each job runs independently.
  • Single-server execution — Traditional cron runs on one machine. If that server goes down, jobs stop silently.
  • No execution history — Cron does not log whether a job succeeded or failed unless you add logging manually.
  • Timezone complexity — Cron uses the server's local timezone, which can cause confusion in distributed teams.
  • Modern Alternatives

    Cloud-based schedulers like AWS EventBridge, Google Cloud Scheduler, and workflow automation platforms have largely replaced raw cron for production use. These provide retry logic, monitoring, distributed execution, and visual scheduling interfaces.

    A cron job runs a task automatically on a fixed time schedule defined by a concise expression. Autonoly exposes the same power without editing crontabs through its scheduled execution feature.

    Why It Matters

    Cron jobs are foundational to any automated workflow that needs to run on a schedule. Understanding how scheduling works helps you design reliable, repeatable automations that collect data, generate reports, or trigger processes without manual intervention.

    How Autonoly Solves It

    Autonoly provides visual workflow scheduling that goes far beyond cron syntax. Set any schedule with a simple interface, get automatic retries on failure, view full execution history, and receive alerts when jobs fail. No server management or crontab editing required.

    Learn more

    Examples

    • Scheduling a web scraping workflow to collect competitor prices every morning at 8 AM across five e-commerce sites.

    • Running a daily cron job at midnight to aggregate API data from multiple SaaS tools into a consolidated Google Sheet.

    • Setting up a weekly Monday 9 AM schedule to generate and email a PDF report summarizing the past week's data.

    Frequently Asked Questions

    A cron job is the Unix/Linux implementation of a scheduled task. Windows uses Task Scheduler for the same purpose. The term 'scheduled task' is more general and platform-agnostic, while 'cron job' specifically refers to the cron daemon and crontab system on Unix-like operating systems.

    Standard cron has a minimum granularity of one minute. To run tasks more frequently, you would need to use a different scheduling mechanism, such as a loop with sleep commands, a dedicated task queue like Celery, or a real-time event-driven system.

    Common approaches include piping output to log files, using monitoring services like Cronitor or Healthchecks.io that alert when expected pings are missed, configuring email notifications via the MAILTO crontab variable, or using a workflow automation platform that provides built-in execution monitoring.

    You might also like

    Blog Posts
    Use Cases

    Related terms, automations and guides

    Where this concept shows up in practice.

    DefinitionTask SchedulingTask scheduling is the process of automating when and how tasks execute, whether on a fixed timetable, triggered by events, or managed through a dependency-aware queue that ensures tasks run in the correct order.DefinitionWorkflow AutomationWorkflow automation is the use of software to execute recurring business processes with minimal human intervention, routing tasks, data, and decisions through a predefined sequence of steps.DefinitionRetry LogicRetry logic is a fault-tolerance pattern that automatically re-attempts failed operations with configurable delays, backoff strategies, and maximum attempt limits to handle transient errors without manual intervention.DefinitionError HandlingError handling is the practice of anticipating, detecting, and responding to errors in software execution, including catching exceptions, logging failures, and implementing fallback logic to keep automated workflows running reliably.DefinitionData PipelineA data pipeline is an automated sequence of steps that moves data from one or more sources to a destination, applying transformations, validations, and enrichments along the way.GuideHow to Schedule and Run Automated Workflows on a Cron ScheduleLearn how to schedule automated workflows to run on a cron schedule. Covers cron expressions, scheduling tools, monitoring, error handling, and best practices for reliable recurring automation.GuideHow to Describe Automation Tasks in Plain EnglishAI browser agents understand natural language, but better descriptions produce dramatically better results. Learn a proven framework for writing task descriptions that get the automation outcomes you want — with templates, real before-and-after examples, and strategies for handling edge cases.DefinitionCI/CDCI/CD (Continuous Integration/Continuous Delivery) is a software development practice that automates code building, testing, and deployment, enabling teams to release updates frequently and reliably through an automated pipeline.

    Stop reading about automation.

    Start automating.

    Describe what you need in plain English. Autonoly's AI agent builds and runs the automation for you — no code required.

    See Features