T
ToolPrime

Cron Expression for Weekly on Monday

Run a cron job every Monday at midnight using 0 0 * * 1. The standard weekly schedule for start-of-week tasks.

Expression

0 0 * * 1

At 00:00 every Monday

Use Cases

Code Examples

Crontab

# At 00:00 every Monday
0 0 * * 1 /path/to/your/script.sh

GitHub Actions

name: Scheduled Job
on:
  schedule:
    - cron: '0 0 * * 1'
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: echo "Running Weekly on Monday"

systemd Timer

[Unit]
Description=Weekly on Monday timer

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

[Install]
WantedBy=timers.target

node-cron (Node.js)

import cron from 'node-cron'

// At 00:00 every Monday
cron.schedule('0 0 * * 1', () => {
  console.log('Running Weekly on Monday')
})

Spring (@Scheduled, Java)

// At 00:00 every Monday
@Scheduled(cron = "0 0 0 * * 1")
public void run() {
    // your task
}

Spring cron has 6 fields (a leading seconds field), so a 0 is prepended to the standard 5-field expression.

Tips

Frequently Asked Questions

What number is Monday in cron?

In standard cron, Monday is 1. The week goes: 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday. Some implementations also accept 7 for Sunday.

Is @weekly on Monday or Sunday?

@weekly is equivalent to 0 0 * * 0, which runs on Sunday at midnight. For Monday, you must use 0 0 * * 1 explicitly.

Related Cron Expressions

Related Tools