ToolsCourt
Cron ToolsAWS CronMonitor & Alert
☁️ AWS Sub-Topic🔧 Tool + Guide

Monitor & Alert When AWS Cron Jobs Fail

AWS EventBridge cron jobs fail silently by default. A Lambda error, a timeout, or a missed invocation produces no notification unless you set it up explicitly. This guide covers 4 monitoring strategies — from simple CloudWatch alarms to heartbeat monitors — with generated AWS CLI commands for each.

Why AWS Cron Jobs Fail Silently

EventBridge fires your scheduled rule at the right time — that part works reliably. What it doesn't do is tell you if the Lambda it invokes throws an error, times out, or produces wrong output. EventBridge only tracks whether it attempted the invocation, not whether it succeeded.

Lambda throws an exception
The function crashes mid-execution. EventBridge marks the invocation as delivered, not failed.
⏱️
Lambda times out
Your function exceeds its timeout limit. Execution stops but the EventBridge rule shows success.
🛑
Throttled invocations
Lambda concurrency limit reached. EventBridge retries but may drop invocations under sustained load.
🌐
Downstream service failure
Your function completes but the API/DB it calls returns an error. The job "ran" but produced no useful output.
🔧 Choose Your Monitoring Strategy
Lambda function name
Alert email
CloudWatch Alarms (errors + missed schedule)
# CloudWatch Alarm — alert when Lambda errors > 0
aws cloudwatch put-metric-alarm \
  --alarm-name "my-scheduled-function-errors" \
  --alarm-description "Alert when my-scheduled-function has Lambda errors" \
  --metric-name Errors \
  --namespace AWS/Lambda \
  --dimensions Name=FunctionName,Value=my-scheduled-function \
  --statistic Sum \
  --period 300 \
  --evaluation-periods 1 \
  --threshold 1 \
  --comparison-operator GreaterThanOrEqualToThreshold \
  --alarm-actions arn:aws:sns:us-east-1:ACCOUNT_ID:my-alerts \
  --treat-missing-data notBreaching

# Also alert when invocations drop to 0 (missed schedule)
aws cloudwatch put-metric-alarm \
  --alarm-name "my-scheduled-function-not-running" \
  --alarm-description "Alert when my-scheduled-function stops being invoked" \
  --metric-name Invocations \
  --namespace AWS/Lambda \
  --dimensions Name=FunctionName,Value=my-scheduled-function \
  --statistic Sum \
  --period 3600 \
  --evaluation-periods 1 \
  --threshold 1 \
  --comparison-operator LessThanThreshold \
  --alarm-actions arn:aws:sns:us-east-1:ACCOUNT_ID:my-alerts \
  --treat-missing-data breaching

AWS Cron Monitoring Best Practices

1
Monitor both errors AND invocations
Set up two CloudWatch alarms: one for Lambda Errors > 0, and one for Invocations < 1 within your expected window. The second catches missed runs — when EventBridge itself fails to invoke.
2
Set Lambda DLQ for async failures
EventBridge invokes Lambda asynchronously. Failed async invocations don't surface in the Lambda error metric until retries are exhausted. A DLQ catches these and gives you a record of every failed invocation.
3
Use CloudWatch Logs Insights for debugging
When an alert fires, run: fields @timestamp, @message | filter @message like /ERROR/ | sort @timestamp desc | limit 20 in the Lambda's log group to find the error immediately.
4
Test your alerts before you need them
Manually throw an error in your Lambda, check that the CloudWatch alarm transitions to ALARM state, and verify the SNS email/Slack message arrives. Don't discover your alerts are misconfigured during a production incident.
5
Set Lambda timeout conservatively
If your cron job normally takes 30 seconds, set a 2-minute timeout. If it exceeds that, CloudWatch will see a Duration > threshold metric. Alert on this separately from errors.

Related AWS Cron Resources

☁️
Tool ↑
AWS Cron Expression Builder
⚙️
Pillar ↑↑
Cron Job Generator
💰
Sibling
AWS Cron Cost Calculator
🌍
Sibling
AWS UTC Timezone Converter
Guide
Avoid CPU Overload
🛡️
Guide
Why Cron Fails Silently