Cron Reference

Cron Every 2 Weeks

Cron expression 0 0 1,15 * * means At 12:00 AM, on the 1st and 15th.

Cron expression to approximate a bi-weekly schedule by running on the 1st and 15th of each month at midnight: 0 0 1,15 * *. The closest standard cron pattern for every-two-weeks.

Cron Expression

0 0 1,15 * *
0Minute
0Hour
1,15Day
*Month
*Weekday

Common use cases

  • Bi-weekly payroll or compensation processing
  • Semi-monthly newsletter delivery
  • Rotating API keys or credentials every two weeks
  • Running bi-weekly dependency audits

Want to customize this schedule?

Open it in the visual builder to tweak the expression interactively.

Open in Builder

Need to monitor this cron job?

Cronhub tracks your scheduled jobs and alerts you if they fail or run late.

Monitor with Cronhub

Platform usage examples

Linux / Unix — crontab
# Edit your crontab
crontab -e

# Add this line to run every 2 weeks
0 0 1,15 * * /usr/bin/php /var/www/html/script.php

# Or run a shell script
0 0 1,15 * * /home/user/scripts/job.sh >> /var/log/job.log 2>&1
GitHub Actions
# .github/workflows/scheduled.yml
name: Scheduled Job

on:
  schedule:
    - cron: '0 0 1,15 * *'

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run job
        run: echo "Running every 2 weeks"
Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-scheduled-job
spec:
  schedule: "0 0 1,15 * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: job
            image: my-image:latest
          restartPolicy: OnFailure

Related developer tools

More free tools for engineering workflows that pair with scheduled jobs:

Frequently asked questions

What is the cron expression for every 2 weeks?

The cron expression is 0 0 1,15 * *. Cron expression to approximate a bi-weekly schedule by running on the 1st and 15th of each month at midnight: 0 0 1,15 * *. The closest standard cron pattern for every-two-weeks.

How do I schedule a cron job to run every 2 weeks in Linux?

Open your crontab with "crontab -e" and add a new line: 0 0 1,15 * * /path/to/your/script.sh — this schedules your script to run every 2 weeks. Save and exit; the cron daemon picks up the change immediately.

What does the cron expression "0 0 1,15 * *" mean?

Cron expression to approximate a bi-weekly schedule by running on the 1st and 15th of each month at midnight: 0 0 1,15 * *. The closest standard cron pattern for every-two-weeks.

Can I use "0 0 1,15 * *" in GitHub Actions?

Yes. In your workflow YAML, set the schedule trigger: on: schedule: - cron: '0 0 1,15 * *'. GitHub Actions uses standard 5-field Unix cron syntax, so this expression works as-is.

Related cron schedules

More Free Developer Tools