Cron Daily at 2 AM

0 2 * * *

Execute daily cron at 2 AM using 0 2 * * *. Common for database maintenance.

Test This Expression →

Understanding 0 2 * * *

The cron expression 0 2 * * * breaks down as follows:

Field Value Meaning
Minute0At minute 0
Hour2At hour 2
Day of Month*Every day of month
Month*Every month
Day of Week*Every day of week

When Does 0 2 * * * Run?

This cron expression will execute:

Example Next Run Times

Starting from January 1, 2025 00:00:

How to Use This Cron Expression

Linux/Unix Crontab

0 2 * * * /path/to/your/script.sh

Kubernetes CronJob

apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-cronjob
spec:
  schedule: "0 2 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: my-job
            image: my-image
          restartPolicy: OnFailure

GitHub Actions

on:
  schedule:
    - cron: '0 2 * * *'

Node.js (node-cron)

const cron = require('node-cron');

cron.schedule('0 2 * * *', () => {
  console.log('Running scheduled task');
});

Frequently Asked Questions

What does the cron expression 0 2 * * * mean?
Execute daily cron at 2 AM using 0 2 * * *. Common for database maintenance.
How do I test 0 2 * * * cron expression?
Use our free Cron Expression Tester to validate 0 2 * * *. Enter the expression, see the next execution times, and verify it matches your expected schedule.
What timezone does 0 2 * * * run in?
Cron expressions use the system timezone by default. For servers, this is typically UTC. Always verify your server's timezone with 'timedatectl' or check your cron daemon configuration.
Can I use 0 2 * * * in Kubernetes?
Yes, Kubernetes CronJobs support standard 5-field cron expressions like 0 2 * * *. Add it to your CronJob spec.schedule field.
How many times does 0 2 * * * run per day?
Runs once per day

Related Cron Expressions

More Cron Tools

GetDevUtils offers a suite of developer tools including: