How to Check Cron Job Execution History

Check cron job execution history on Linux servers. Monitor cron job execution, track execution logs, detect failed executions, and set up automated cron history monitoring with Zuzia.app.

Last updated: 2026-01-11

How to Check Cron Job Execution History

Need to check cron job execution history on your Linux server? Want to monitor cron job execution, track execution logs, and detect failed executions? This guide shows you how to check cron job execution history using built-in commands and automated monitoring with Zuzia.app.

For comprehensive cron monitoring strategies, see Cron Jobs and Scheduled Tasks Monitoring Guide. For troubleshooting cron issues, see Cron Jobs Not Executing.

Why Checking Cron Execution History Matters

Cron jobs execute scheduled tasks automatically. When cron jobs fail to execute or execute incorrectly, critical tasks can be missed, backups can fail, and maintenance operations can be skipped. Checking cron execution history helps you verify jobs execute successfully, track execution patterns, detect execution failures, and maintain task reliability.

Method 1: View Cron Execution Logs

View cron execution logs to see job execution history:

Check System Cron Logs

# View cron execution logs
grep CRON /var/log/syslog

# View recent cron executions
grep CRON /var/log/syslog | tail -50

# View cron executions for specific user
grep CRON /var/log/syslog | grep username

# View cron executions by date
grep CRON /var/log/syslog | grep "$(date +%b\ %d)"

Monitor Cron Job Output

# Check for cron job errors
grep CRON /var/log/syslog | grep -i "error\|fail"

# View cron job execution times
grep CRON /var/log/syslog | awk '{print $1, $2, $3, $6, $7, $8}'

# Monitor cron executions in real-time
tail -f /var/log/syslog | grep CRON

Method 2: Track Specific Cron Jobs

Track specific cron jobs to verify they execute:

Check Job Execution

# Check if specific job executed recently
grep "job-name" /var/log/syslog | tail -5

# Verify job execution time
grep "job-name" /var/log/syslog | grep "$(date +%b\ %d)" | tail -1

# Check job execution frequency
grep "job-name" /var/log/syslog | wc -l

# View job execution history
grep "backup-script" /var/log/syslog | tail -20

Monitor Job Success

# Check for successful job executions
grep "job-name" /var/log/syslog | grep -i "success\|complete"

# View job execution errors
grep "job-name" /var/log/syslog | grep -i "error\|fail"

# Check job exit codes
grep "job-name" /var/log/syslog | grep -E "exit [1-9]"

Method 3: Detect Execution Failures

Detect execution failures to identify problematic jobs:

Identify Failed Executions

# Check for cron execution errors
grep CRON /var/log/syslog | grep -i "error\|fail\|exit"

# View jobs with non-zero exit codes
grep CRON /var/log/syslog | grep -v "exit 0"

# Check for missed executions
grep CRON /var/log/syslog | grep -i "missed\|skip"

# View cron job failures by user
grep CRON /var/log/syslog | grep -i "error\|fail" | awk '{print $6}' | sort | uniq -c

Monitor Execution Patterns

# Count cron executions per hour
grep CRON /var/log/syslog | awk '{print $3}' | cut -d: -f1 | sort | uniq -c

# View cron job execution frequency
grep CRON /var/log/syslog | awk '{print $6, $7, $8}' | sort | uniq -c

# Analyze cron job timing patterns
grep CRON /var/log/syslog | awk '{print $3}' | sort | uniq -c

Method 4: Automated Cron History Monitoring with Zuzia.app

While manual cron history checks work for verification, production Linux servers require automated cron history monitoring that continuously tracks execution history, detects failures, and alerts you when cron jobs don't execute successfully.

How Zuzia.app Cron History Monitoring Works

Zuzia.app automatically monitors cron execution history through scheduled command execution and log analysis. The platform checks execution logs, tracks job execution, detects failures, and sends alerts when cron jobs fail.

Setting Up Cron History Monitoring

  1. Add Scheduled Task for Execution Monitoring

    • Command: grep CRON /var/log/syslog | tail -20 | grep -i "error\|fail"
    • Frequency: Every 10 minutes
    • Alert when: Cron errors detected
  2. Configure Critical Job Monitoring

    • Command: grep "critical-job-name" /var/log/syslog | tail -1 | grep "$(date +%b\ %d)"
    • Frequency: Every hour (after expected execution time)
    • Alert when: Job didn't execute
  3. Set Up Execution History Tracking

    • Command: grep CRON /var/log/syslog | tail -50
    • Frequency: Once daily
    • Alert when: Unusual execution patterns detected

Custom Cron History Monitoring Commands

Add these commands as scheduled tasks:

# Check for cron execution errors
grep CRON /var/log/syslog | grep -i "error\|fail" | tail -10

# Verify critical job executed
grep "backup-script" /var/log/syslog | grep "$(date +%b\ %d)" | tail -1

# View recent cron executions
grep CRON /var/log/syslog | tail -20

Best Practices

1. Monitor Cron History Continuously

Use Zuzia.app for continuous cron history monitoring. Set up alerts before execution issues become critical. Review execution logs regularly.

2. Track Critical Jobs

Focus monitoring on business-critical tasks. Set up dedicated monitoring for critical jobs. Configure immediate alerts for critical job failures.

3. Verify Job Success

Don't just check if jobs run. Verify job exit codes. Check job output for errors. Validate job results.

Troubleshooting

Job Not Executing

When jobs don't execute:

  1. Check cron service: systemctl status cron
  2. Verify cron job syntax: crontab -l
  3. Check execution logs: grep CRON /var/log/syslog | tail -20

Job Execution Failures

When jobs fail:

  1. Review execution logs: grep "job-name" /var/log/syslog | tail -20
  2. Check job output: grep "job-name" /var/log/syslog | grep -i "error\|fail"
  3. Test job manually: Run job command directly

FAQ

For production servers, check cron history every 10-15 minutes. Zuzia.app can check history automatically and alert when execution issues are detected.

Monitor all production cron jobs, especially critical tasks like backups, database maintenance, and reports.

Yes, Zuzia.app can detect execution failures by monitoring cron logs, checking for error messages, verifying job execution, and alerting when jobs fail.

Note: The content above is part of our brainstorming and planning process. Not all described features are yet available in the current version of Zuzia.

If you'd like to achieve what's described in this article, please contact us – we'd be happy to work on it and tailor the solution to your needs.

In the meantime, we invite you to try out Zuzia's current features – server monitoring, SSL checks, task management, and many more.

We use cookies to ensure the proper functioning of our website.