⚡
fasttools.me
Run Cron Job Every 2 Minutes (*/2 * * * *)
High-Frequency • 720 Executions Daily

Run Cron Job Every 2 Minutes (*/2 * * * *)

Run cron jobs every 2 minutes (*/2 * * * *). Visual field breakdown, upcoming execution timetable, and high-frequency production script templates.

Direct Answer Definition

To schedule a cron job every 2 minutes in Linux, use the expression */2 * * * *. The step value */2 in the minute position executes the command at minutes 0, 2, 4, 6, 8... through 58 of every hour, triggering 720 times every 24 hours.

POSIX Cron Expression (5-Field)
Valid Syntax
Natural Language Schedule

Every 2 minutes

Standard Schedule PresetsClick to load

Interactive 5-Field Workbench

Adjust individual cron segments in real time with instant two-way synchronization.

1. Minute*/2
0 – 59
2. Hour*
0 – 23 (24h)
3. Day of Month*
1 – 31
4. Month*
1 – 12 (Jan – Dec)
Select Month
5. Day of Week*
0 – 6 (Sun – Sat)
Select Day

Next 5 Scheduled Executions

Real-time schedule timetable projected forward from current timestamp.

12026-10-08 09:04:00 UTC
in 1 min
22026-10-08 09:06:00 UTC
in 3 min
32026-10-08 09:08:00 UTC
in 5 min
42026-10-08 09:10:00 UTC
in 7 min
52026-10-08 09:12:00 UTC
in 9 min

Crontab Command Snippet

Enter your executable command or script path to generate the full crontab configuration line.

Ready to paste in `crontab -e`*/2 * * * * curl -fsS https://example.com/cron-job
Runs in system timezone or explicit TZ variablePOSIX Spec
Advertisement
Sponsored Developer Space
Cron Field Syntax Mapping

Field-by-Field Breakdown of `*/2 * * * *`

PositionField NameAllowed ValuesValue in `*/2 * * * *`Evaluation Meaning
1Minute0 – 59*/2*/2 (Even minutes: 0, 2, 4, 6... 58)
2Hour0 – 23** (Every hour: 0-23)
3Day of Month1 – 31** (Every day of the month: 1-31)
4Month1 – 12** (Every month: 1-12)
5Day of Week0 – 6 (Sun-Sat)** (Every day of the week: 0-6)
Technical Engineering Analysis

High-Frequency Step Cadence and Worker Load

Running tasks every 2 minutes provides near-real-time automation without the heavy system daemon churn of a 1-minute loop. It is widely used for processing queued jobs, syncing webhook events, and streaming heartbeat telemetry.

Because */2 fires at every even minute, the maximum latency between task runs is 120 seconds. If an invocation encounters an intermittent network timeout, the next run begins in moments.

Scripts scheduled every 2 minutes must be strictly bound by execution limits. An unhandled loop that hangs for 3 minutes will spawn overlapping instances unless wrapped with lockfiles.

Real-World Server Implementations

Common Production Scenarios for `*/2 * * * *`

Case 01

Webhook Event Ingestion Buffer

Drains incoming Stripe and GitHub webhook event payloads from temporary Redis streams to persistent database tables.

/usr/bin/node /opt/webhooks/process_incoming_queue.js
Case 02

Payment Settlement Status Polling

Polls async bank transfer statuses for pending user deposits requiring immediate account balance updates.

/usr/bin/python3 /opt/billing/poll_pending_payments.py
Case 03

Distributed Cache Node Liveness Check

Pings secondary Redis/Memcached cluster nodes, triggering automated failover alerts if heartbeats fail twice consecutively.

/usr/local/bin/check_redis_nodes.sh
Operational Traps & Failure Modes

Production Gotchas When Running `*/2 * * * *`

  • Job Accumulation: A 120-second window leaves little buffer for slow database queries. Wrap all jobs in flock -n to prevent pileups.
  • Database Connection Churn: Opening and closing hundreds of database connections every 2 minutes can exhaust connection pools. Use connection pooling (PgBouncer).
  • Local Mail Bloat: Ensure output is piped to logfiles or /dev/null to avoid 720 automated emails daily.

Frequently Asked Questions About `*/2 * * * *`

Does */2 * * * * run on odd minutes?

No, */2 starts from minute 0 and evaluates even minutes only: 0, 2, 4, 6, 8, 10, 12, etc.

How do I run a job on odd minutes instead of even minutes?

Use a range with a step: 1-59/2 * * * * /path/to/script.sh. This triggers at minutes 1, 3, 5, 7, 9... 59.

What happens if a 2-minute job takes 90 seconds to finish?

It finishes safely 30 seconds before the next run begins. However, if execution time fluctuates above 120 seconds, concurrent processes will overlap without lock protection.

Related Cron Schedule Generators