---
title: "Cron every two weeks: crontab workaround"
url: "https://cronmissed.com/cron/every-two-weeks.md"
canonical_url: "https://cronmissed.com/cron/every-two-weeks"
last_updated: "2026-10-22"
type: "reference"
summary: "Cron has no every-two-weeks schedule. A crontab line with a week-number test runs a job fortnightly. Here is how, and how to watch it."
related: ["https://cronmissed.com/cron.md", "https://cronmissed.com/cron/first-monday-of-the-month.md", "https://cronmissed.com/cron/last-day-of-the-month.md", "https://cronmissed.com/cron/every-90-minutes.md", "https://cronmissed.com/tools/cron-explainer.md"]
---

# Cron every two weeks: crontab workaround

> **For AI agents:** the complete index of CronMissed pages is [llms.txt](https://cronmissed.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Cron has no every-two-weeks schedule. A crontab line with a week-number test runs a job fortnightly. Here is how, and how to watch it.

`0 9 * * 1`: At 09:00, on Monday.

## How do you run a job every two weeks with cron?

The line runs every Monday, and the test lets the job through on alternate weeks: it counts whole weeks since 1 January 1970 and checks whether the count is even. Change -eq 0 to -eq 1 to switch weeks.

```crontab
0 9 * * 1 [ $(( $(date +\%s) / 604800 \% 2 )) -eq 0 ] && /usr/local/bin/job.sh
```

## What does 0 9 * * 1 mean?

| Field | Written | Means |
| --- | --- | --- |
| minute | `0` | 0 |
| hour | `9` | 9 |
| day of month | `*` | every day of month |
| month | `*` | every month |
| day of week | `1` | Monday |

## How often does it run?

On a day it runs, it runs once. It runs on 52 days of 2027, 52 runs in all. Runs are 7 days apart.

## When is this schedule useful?

Fortnightly payroll, biweekly sprint reports, and reminders that follow a two-week cycle.

## What should you watch out for?

Writing 0 9 */14 * * runs on the 1st, 15th and 29th of each month, not every 14 days. The week-number test keeps a true two-week rhythm.

## What happens when the clocks change?

On Sunday 14 March 2027, clocks in America/New_York jump from 02:00 to 03:00. This schedule does not run that day, so the change does not touch it.

On Sunday 1 November 2026, clocks in America/New_York fall back from 02:00 to 01:00, so the hour from 01:00 happens twice. This schedule does not run that day, so the change does not touch it.

A server that keeps its clock on UTC never sees either change.

## How do you get an alert when it stops running?

Create a simple check that expects a ping every 14 days, with 5 minutes of grace, and ping it at the end of the job:

```crontab
0 9 * * 1 [ $(( $(date +\%s) / 604800 \% 2 )) -eq 0 ] && /usr/local/bin/job.sh && curl -fsS --max-time 10 --retry 5 --retry-connrefused -o /dev/null "https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10"
```

The [snippet builder](https://cronmissed.com/tools/snippet-builder.md) writes the same ping for systemd, GitHub Actions, Vercel, Kubernetes and backup scripts.

## More schedules one cron line cannot write schedules

- [First Monday of the month](https://cronmissed.com/cron/first-monday-of-the-month.md): `0 9 1-7 * *`
- [Last day of the month](https://cronmissed.com/cron/last-day-of-the-month.md): `0 0 28-31 * *`
- [Every 90 minutes](https://cronmissed.com/cron/every-90-minutes.md): `0 0-21/3 * * *`
- [Every 30 seconds](https://cronmissed.com/cron/every-30-seconds.md): `* * * * *`

## Related

- [Cron expression and crontab examples](https://cronmissed.com/cron.md)
- [Cron first Monday of the month](https://cronmissed.com/cron/first-monday-of-the-month.md)
- [Cron last day of the month: crontab workaround](https://cronmissed.com/cron/last-day-of-the-month.md)
- [Cron every 90 minutes: crontab workaround](https://cronmissed.com/cron/every-90-minutes.md)
- [Cron expression translator and evaluator](https://cronmissed.com/tools/cron-explainer.md)
