Launch Workspace
Standard Cron · 5 fields · Daily at 4:00 AM

Cron Expression: Every Day at 4:00 AM — 0 4 * * *

Executes once every 24 hours at exactly 04:00:00 AM local or UTC system clock.

Dialect:
5 fields
Plain EnglishDaily

“Every day at 4:00 AM”

Runs every day at 4:00 am. Evaluated according to STANDARD cron specifications.

Popular Presets:

What Does 0 4 * * * Mean?

In standard 5-field UNIX / Linux Cron syntax, 0 4 * * * breaks down into five separate time units:

  • Minute (0): At minute 0 (on the exact hour).
  • Hour (4): At hour 4 (4:00 AM in 24-hour military time).
  • Day of Month (*): Every day of the month (1 through 31).
  • Month (*): Every month of the year (January through December).
  • Day of Week (*): Every day of the week (Sunday through Saturday).

Combined, this expression commands the scheduler to run your task once every single day when the clock hits 04:00.

Common Mistake: Interval vs Fixed Time

Do not confuse 0 4 * * * with 0 */4 * * *. The step expression 0 */4 * * * runs every 4 hours (6 times a day). In contrast, 0 4 * * * runs strictly once a day at 4:00 AM.

Platform Examples for 0 4 * * *

Ready-to-use snippets for all major platforms and schedulers.

Linux / Crontab5-field POSIX cron
# /etc/cron.d/my-schedule
MAILTO="admin@example.com"
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# Runs every day at 4:00 AM
0 4 * * * www-data /usr/local/bin/my-script.sh >> /var/log/my-script.log 2>&1
Kubernetesbatch/v1 CronJob manifest
apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-scheduled-job
  labels:
    app: my-scheduled-job
spec:
  schedule: "0 4 * * *"
  timeZone: "UTC"          # requires Kubernetes v1.27+
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: job
            image: alpine:latest
            command:
            - /bin/sh
            - -c
            - echo "Job executed at $(date)"
          restartPolicy: OnFailure
GitHub Actionsworkflow schedule trigger (UTC only)
name: Scheduled Workflow

on:
  schedule:
    # Runs every day at 4:00 AM — evaluated strictly in UTC
    - cron: "0 4 * * *"
  workflow_dispatch: # allow manual trigger

jobs:
  run-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run task
        run: echo "Workflow triggered at $(date)"
Spring Boot@Scheduled — 6-field cron with seconds
@Component
public class ScheduledTask {

    private static final Logger log = LoggerFactory.getLogger(ScheduledTask.class);

    // Runs every day at 4:00 AM
    // Spring uses 6-field cron: sec min hr dom mon dow
    @Scheduled(cron = "0 0 4 * * *", zone = "UTC")
    public void runTask() {
        log.info("Scheduled job started at: {}", LocalDateTime.now());
        // your business logic here
    }
}
AWS EventBridge6-field cron with year field
# AWS EventBridge Rule (CloudFormation)
Resources:
  ScheduledRule:
    Type: AWS::Events::Rule
    Properties:
      Name: my-scheduled-rule
      ScheduleExpression: "cron(0 4 * * ? *)"
      State: ENABLED
      Targets:
        - Arn: !GetAtt MyLambdaFunction.Arn
          Id: LambdaTarget

Common Variations

Related expressions for similar scheduling needs.

ExpressionDescription
0 4 * * *Every day at 4:00 AM (04:00)
30 4 * * *Every day at 4:30 AM (04:30)
0 4 * * 1-5Weekdays (Monday–Friday) at 4:00 AM
0 4 * * 0,6Weekends (Saturday & Sunday) at 4:00 AM
0 4 1 * *First day of every month at 4:00 AM
0 */4 * * *Every 4 hours (00:00, 04:00, 08:00, 12:00, 16:00, 20:00)

Frequently Asked Questions

Everything you need to know about Cron expressions, syntax rules, and platform nuances.

What is the Cron expression for every day at 4:00 AM?

The Cron expression is "0 4 * * *". The first field is minute 0, and the second field is hour 4 (04:00 in 24-hour military time). The remaining three fields (* * *) match every day of the month, every month, and every day of the week.

What is the difference between "0 4 * * *" and "0 */4 * * *"?

"0 4 * * *" executes only ONCE per day at 4:00 AM. In contrast, "0 */4 * * *" uses a step value and executes SIX times per day: at 00:00, 04:00, 08:00, 12:00, 16:00, and 20:00.

How do I run a backup script at 4:00 AM in Linux crontab?

Open crontab with "crontab -e" and append: "0 4 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1". This guarantees daily execution at 04:00 AM system time.

How do I schedule a 4:00 AM task in Spring Boot?

Use the 6-field Spring annotation: @Scheduled(cron = "0 0 4 * * *", zone = "UTC"). The first 0 specifies second 0, the second 0 specifies minute 0, and 4 specifies 4:00 AM.

Why is 4:00 AM a popular time for batch Cron jobs?

4:00 AM local time is typically the lowest-traffic period for web applications, consumer databases, and office networks. It allows heavy maintenance jobs (database VACUUM, log archiving, ETL pipelines) to finish before business hours begin.