← All cron schedules

Cron every 2 weeks

The cron expression 0 9 * * 1 runs a job at 09:00, on Monday; a date guard in the command limits it to every 2 weeks. The guard exits early on the other dates, so give the job's heartbeat monitor a period that matches the real schedule, not the cron expression.

Cron expression for every 2 weeks (plus the line below):
0 9 * * 1
At 09:00, on Monday.
Standard cron can't express this schedule on its own; the crontab line below adds a guard in the command.
minutehourday of monthmonthday of week
09**1

Next runs (UTC)

  1. Mon 2026-11-30 09:00 UTC (+00:00) · in 3d 5h
  2. Mon 2026-12-07 09:00 UTC (+00:00) · in 10d 5h
  3. Mon 2026-12-14 09:00 UTC (+00:00) · in 17d 5h
  4. Mon 2026-12-21 09:00 UTC (+00:00) · in 24d 5h
  5. Mon 2026-12-28 09:00 UTC (+00:00) · in 31d 5h
  6. Mon 2027-01-04 09:00 UTC (+00:00) · in 38d 5h
  7. Mon 2027-01-11 09:00 UTC (+00:00) · in 45d 5h
  8. Mon 2027-01-18 09:00 UTC (+00:00) · in 52d 5h
  9. Mon 2027-01-25 09:00 UTC (+00:00) · in 59d 5h
  10. Mon 2027-02-01 09:00 UTC (+00:00) · in 66d 5h

These are the times cron wakes up; the guard in the command then decides whether the job actually runs.

Notes for this schedule

Cron has no 'every other week'. 0 9 */14 * * is wrong: it means days 1, 15 and 29 of each month. The fix is to schedule weekly and skip every second week in the command.
The guard counts whole weeks since 1970 (date +%s / 604800), so it alternates strictly forever. Checking the ISO week number (date +%V) instead breaks at New Year in 53-week years like 2026: weeks 53 and 1 are both odd, giving a 3-week gap. Flip -eq 0 to -eq 1 to pick the other week.
The ping goes out on every Monday wake-up, including the skipped weeks, so the heartbeat can use the same weekly expression; a failed run still skips the ping and alerts you.
In a crontab, % starts a new line of input to the command, so it must be escaped as \%, as in the guard above.

This schedule in numbers

  • Cron wakes up 52 times in 2026; the guard in the command lets the job itself run on 26 of those days.
  • India has no daylight saving time, so this schedule keeps the same Indian time all year: 09:00 UTC is 14:30 IST the same day. To run at 09:00 India time on a UTC server, the expression is 30 3 * * 1.
  • None of this schedule's times (09:00) fall inside the next DST changes in New York or London, so in those zones it keeps its local time; the UTC time it runs at moves by an hour twice a year instead.
  • GitHub Actions reads cron: in UTC (09:00 UTC here) unless the schedule entry adds timezone: "Asia/Kolkata"; Kubernetes 1.27+ does the same with spec.timeZone, and either way it runs at 09:00 IST. CRON_TZ= inside a Kubernetes schedule string is rejected.

Next 5 runs on a UTC server, with India time

UTCIST (UTC+05:30)
Mon 30 Nov 2026, 14:30
Mon 07 Dec 2026, 14:30
Mon 14 Dec 2026, 14:30
Mon 21 Dec 2026, 14:30
Mon 28 Dec 2026, 14:30

Examples

crontab (crontab -e)
0 9 * * 1 if [ $(( $(date +\%s) / 604800 \% 2 )) -eq 0 ]; then /usr/local/bin/my-job.sh; fi && curl -fsS -m 10 --retry 3 -o /dev/null https://puzaricloud.in/ping/<your-token>
systemd timer
# /etc/systemd/system/my-job.timer
[Unit]
Description=Run my-job (every 2 weeks)

[Timer]
OnCalendar=Mon *-*-* 09:00:00
Persistent=true

[Install]
WantedBy=timers.target
and the service it starts
# /etc/systemd/system/my-job.service
[Unit]
Description=my-job

[Service]
Type=oneshot
ExecStart=/usr/local/bin/my-job.sh
# systemd can't express 'every 2 weeks': put the even-week check at the top of my-job.sh,
# or drop OnCalendar and use OnUnitActiveSec=2w (drifts by the run time)
# runs only if ExecStart succeeded
ExecStartPost=/usr/bin/curl -fsS -m 10 --retry 3 -o /dev/null https://puzaricloud.in/ping/<your-token>

Check the calendar spec with systemd-analyze calendar "Mon *-*-* 09:00:00", then systemctl enable --now my-job.timer. Persistent=true runs a missed job at boot. Convert this schedule to Quartz or AWS cron() →

Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-job
spec:
  schedule: "0 9 * * 1"
  timeZone: "Etc/UTC"          # Kubernetes 1.27+; otherwise the controller's timezone
  concurrencyPolicy: Forbid       # don't start a new run while one is active
  startingDeadlineSeconds: 300    # still start if the controller was briefly down
  jobTemplate:
    spec:
      backoffLimit: 2
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: job
              image: your-image:tag
              command: ["/bin/sh", "-c", "if [ $(( $(date +%s) / 604800 % 2 )) -eq 0 ]; then /app/run-job.sh; fi && curl -fsS -m 10 --retry 3 -o /dev/null https://puzaricloud.in/ping/<your-token>"]
GitHub Actions
on:
  schedule:
    - cron: "0 9 * * 1"   # UTC unless you add timezone: under it
  workflow_dispatch: {}          # lets you run it by hand too

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: "if [ $(( $(date +%s) / 604800 % 2 )) -eq 0 ]; then ./run-job.sh; fi"
      - name: Tell Vigil the job ran
        if: success()
        run: curl -fsS -m 10 --retry 3 -o /dev/null https://puzaricloud.in/ping/${{ secrets.VIGIL_PING_TOKEN }}

GitHub reads schedules in UTC unless the entry sets timezone: (an IANA name), can delay them at busy times, and disables scheduled workflows in public repos after 60 days without activity.

Common mistakes

Server timezone. cron uses the machine's local timezone, and most cloud VMs and containers are set to UTC. Check with timedatectl or date. cronie (RHEL, Fedora, Arch) accepts CRON_TZ=Asia/Kolkata at the top of a crontab; Debian/Ubuntu cron does not.
Daylight saving time. On DST days, local times around 01:00-03:00 are skipped or repeated. Vixie cron/cronie try to run skipped fixed-time jobs just after the jump and not twice in the repeated hour; Kubernetes, systemd and most libraries behave differently. Schedule in UTC if 'exactly once' matters.
Day-of-month OR day-of-week. If both the 3rd and 5th fields are restricted, cron runs when either matches: 0 0 13 * 5 runs on every 13th and every Friday, not only on Friday the 13th.
Unescaped %. In a crontab line, % is turned into a newline (everything after it goes to the command's stdin). Write date +\%F, not date +%F.
A different environment. cron runs with a minimal PATH (often just /usr/bin:/bin), no login shell and no .bashrc. Use absolute paths and set variables at the top of the crontab.
Silent failures. cron doesn't tell anyone when a job fails or stops running; output goes to local mail nobody reads. A heartbeat monitor that expects a ping after every run is the only reliable way to notice.

How to get alerted when it doesn't run

A cron job that stops running looks exactly like one that's working: no errors, no output. The reliable fix is a heartbeat (dead man's switch): the job pings a URL each time it finishes, and the monitor alerts you when a ping is late.

  1. Create a heartbeat in Vigil and choose cron schedule: 0 9 * * 1, timezone of your server.
  2. Set a grace period of about 60 minutes: long enough for a normal run to finish, short enough that you hear about it quickly.
  3. Add the ping to the end of the command (above). && means only successful runs ping; use /ping/<token>/$? to report the exit code, and /start to catch jobs that hang.

Watch this schedule — get alerted if it doesn't run

More: how to monitor cron jobs (exit codes, run time, logs) · heartbeat monitoring, explained

Related: every weekday (Monday to Friday) 0 9 * * 1-5 · every weekend (Saturday and Sunday) 0 10 * * 6,0 · every Monday 0 9 * * 1 · every Friday 0 17 * * 5 · every Sunday 0 3 * * 0 · once a week 0 0 * * 0
How Vigil can watch this for you

Vigil tells you when a run is missed

Vigil heartbeats understand cron expressions and timezones, so they know exactly when each run is due. Missed, failed or stuck runs alert you on email, Slack, Telegram, Discord or a webhook, and the history shows every run's duration.

Monitor this cron job free
Free plan, no card. Alerts on email, Telegram, Slack, Discord, Teams or any webhook.
More free tools: