# Scheduled job (cron)

> A scheduled job is a task that a system runs automatically at set times or intervals, such as every hour or each weekday at six, often defined with a cron expression; it is the simplest way to start an automation without a person.

Also called: cron job, cron, scheduled task, scheduled trigger, batch job. Category: Agents and automation. Source: https://aibuildindex.com/glossary/scheduled-job

## In the index

- Workflow automation: median $1,600, middle half $300 to $6,000, 7,018 priced briefs (https://aibuildindex.com/skills/workflow-automation)
- Scripting: median $970, middle half $200 to $4,800, 410 priced briefs (https://aibuildindex.com/skills/scripting)
- Back-office automation: median $2,400, middle half $450 to $6,400, 5,053 priced briefs (https://aibuildindex.com/cost/back-office-automation)

Many automations do not need to react to anything in particular; they just need to happen regularly. A scheduled job runs a task on a timetable: pull yesterday's orders at six each morning, send a weekly report on Monday, refresh a dataset every hour. The name cron comes from the Unix utility that has done this for decades, and its compact timetable syntax is still used by most automation tools and cloud platforms. For a buyer, knowing whether a process runs on a schedule or on an event explains a lot about how quickly it responds and how it fails.

## How it works

A scheduler holds a list of jobs and their timetables and starts each job when its time comes. A cron expression has five fields, for minute, hour, day of month, month and day of week, so "0 6 * * 1-5" means six o'clock on weekdays. In tools such as n8n, Zapier and Make the same thing appears as a schedule [trigger](https://aibuildindex.com/glossary/trigger) with a friendlier form. Cloud platforms offer managed schedulers that call a function or URL on the timetable.

A typical example: at two each night, a job exports new invoices from an accounting system, summarises overdue ones with a language model and emails the summary to the finance lead before the working day starts. Grouping work into one nightly run like this is also how [batch processing](https://aibuildindex.com/glossary/batch-processing) discounts on model calls are usually used.

## What it means for cost

Scheduled jobs are among the cheapest automations to build, but a few choices affect price and running cost:

- **Frequency.** Running every minute instead of every hour multiplies executions, which matters on platforms billed per run and for model calls.
- **Overlap.** If a run can take longer than the gap between runs, the job needs locking so two copies do not process the same records.
- **Failure handling.** A job that runs at night with no one watching needs [error handling](https://aibuildindex.com/glossary/error-handling), alerts and a way to rerun safely, which depends on [idempotency](https://aibuildindex.com/glossary/idempotency).

Ask a builder what happens if a run fails or the server is down at the scheduled time, and whether missed runs are caught up.

## When it is the wrong tool

If something needs to happen as soon as an event occurs, such as replying to a new lead within a minute, polling on a schedule adds delay and wasted runs. A webhook or [event-driven architecture](https://aibuildindex.com/glossary/event-driven-architecture) is the better fit there.

## Common questions

### What time zone does a cron job use?

It uses whatever the scheduler is configured for, which is often UTC on servers and cloud platforms. That catches people out when clocks change for daylight saving. Confirm the time zone explicitly when a job must run at a local business hour.

### Is a scheduled job the same as a workflow?

No. The schedule is only the starting signal. The workflow is the series of steps that runs once the schedule fires. The same workflow could equally be started by a webhook or a button.

## Related terms

- [Trigger](https://aibuildindex.com/glossary/trigger): A trigger is the event that starts an automated workflow or AI agent, such as a new email, a form submission, a database change, an incoming webhook or a scheduled time.
- [Workflow automation](https://aibuildindex.com/glossary/workflow-automation): Workflow automation is the use of software to carry out a repeatable business process, moving data between systems and taking actions based on triggers and rules, so that people no longer do those steps by hand.
- [Error handling and retries](https://aibuildindex.com/glossary/error-handling): Error handling and retries are the parts of an automation or AI system that detect failed steps, try them again where that is safe, and report or park the work that still fails, so problems are noticed rather than silently lost.
- [Idempotency](https://aibuildindex.com/glossary/idempotency): Idempotency is the property of an operation that produces the same result whether it runs once or several times, so a retried or duplicated request does not create a second invoice, email or record.
- [Batch processing](https://aibuildindex.com/glossary/batch-processing): Batch processing is running a large set of AI requests together as a background job rather than one at a time in real time, which suits work that can wait and is often cheaper through providers' batch services.
- [Event-driven architecture](https://aibuildindex.com/glossary/event-driven-architecture): Event-driven architecture is a way of designing software in which components react to events, such as a new order or a signed contract, as they happen, rather than checking for changes on a timetable or calling each other directly.
