Troubleshooting Guide
Common issues and their solutions when working with CronMonitor.
Monitor Shows "Down" But Job Is Running #
Symptoms #
- Your cron job executes successfully
- CronMonitor shows the monitor as "Down"
- No pings appear in the monitor history
Possible Causes & Solutions #
1. Wrong Ping URL #
Check:
# Log the ping URL your script is using
echo "Pinging: $PING_URL" >> /var/log/cronmonitor.log
curl -v "$PING_URL" 2>&1 | tee -a /var/log/cronmonitor.log
Solution:
- Copy the ping URL directly from the monitor details page
- Ensure no extra spaces or line breaks
- Use quotes around the URL in bash scripts
2. Network Connectivity Issues #
Test connectivity:
# Test if you can reach CronMonitor
curl -I https://cronmonitor.io
ping -c 4 cronmonitor.io
# Test with your actual ping URL
curl -v https://cronmonitor.io/ping/your-monitor-id
Common network issues:
- Firewall blocking outbound HTTPS
- DNS resolution problems
- Proxy configuration needed
Solution for proxy:
# Set proxy in curl
curl -x http://proxy.company.com:8080 https://cronmonitor.io/ping/abc123
# Set proxy in environment
export https_proxy=http://proxy.company.com:8080
curl https://cronmonitor.io/ping/abc123
3. Cron Job Failing Before Ping #
Problem:
# Job fails, ping never runs
0 2 * * * /path/to/backup.sh && curl https://cronmonitor.io/ping/abc123
Debug:
# Add logging to see what's happening
0 2 * * * /path/to/backup.sh 2>&1 | tee -a /var/log/backup.log && curl https://cronmonitor.io/ping/abc123
Solution: Check if your script is actually succeeding. Add error handling:
#!/bin/bash
set -e # Exit on error
# Your backup logic
/usr/bin/mysqldump -u root database > backup.sql
# Only reached if above succeeds
curl https://cronmonitor.io/ping/abc123
4. SSL Certificate Issues #
Symptoms:
curl: (60) SSL certificate problem: unable to get local issuer certificate
Solution:
# Update CA certificates
sudo apt-get update
sudo apt-get install ca-certificates
# Or skip verification (not recommended for production)
curl -k https://cronmonitor.io/ping/abc123
5. Timeout Issues #
Symptoms: Long-running curl commands that timeout
Solution:
# Set reasonable timeout
curl -m 10 --retry 3 https://cronmonitor.io/ping/abc123
# Run in background
curl https://cronmonitor.io/ping/abc123 &
Wrong Schedule Detection #
Symptoms #
- Job runs successfully
- CronMonitor marks it as late or missed
- Times don't match expectations
Solutions #
Check Timezone Configuration #
Problem: Monitor timezone doesn't match your server
Verify server timezone:
date
timedatectl # On systemd systems
cat /etc/timezone
Solution: Update monitor timezone in CronMonitor dashboard to match your server.
Verify Cron Expression #
Common mistakes:
# β Wrong: This runs every minute, not daily at 2am
* 2 * * * /path/to/job.sh
# β
Correct: Runs daily at 2am
0 2 * * * /path/to/job.sh
Use crontab.guru to verify your expression.
DST (Daylight Saving Time) Issues #
During DST transitions, times can shift by an hour.
Solution:
- Use UTC timezone for monitors if possible
- Adjust grace period during DST transition weeks
- Consider using explicit times instead of cron expressions
Pings Received But Status Not Updating #
Possible Causes #
1. Using Wrong Monitor ID #
Check:
# Your ping URL should match the monitor
# Monitor ID: mon_abc123
# Ping URL: https://cronmonitor.io/ping/def456 β Wrong!
# Ping URL: https://cronmonitor.io/ping/abc123 β
Correct
2. Monitor Is Paused #
Check: Monitor status in dashboard. If paused, it won't update.
Solution: Resume the monitor from the dashboard.
3. Browser Cache #
Solution:
- Hard refresh the page (Ctrl+F5 or Cmd+Shift+R)
- Clear browser cache
- Try incognito/private browsing mode
Grace Period Too Short #
Symptoms #
- Getting false alerts
- Job runs successfully but slightly late
- Alerts triggered during server load spikes
Solution #
Increase grace period to account for:
- Server load variations
- Network latency
- Job execution time variance
Example:
Job scheduled: 02:00:00
Job usually completes by: 02:00:30
Occasional delays up to: 02:02:00
Recommended grace period: 5-10 minutes
Learn more about grace periods β
Multiple Jobs Using Same Monitor #
Problem #
Multiple cron jobs pinging the same monitor causes confusion.
Bad:
0 2 * * * /backup-mysql.sh && curl https://cronmonitor.io/ping/abc123
0 3 * * * /backup-files.sh && curl https://cronmonitor.io/ping/abc123
Solution: Create separate monitors for each job:
0 2 * * * /backup-mysql.sh && curl https://cronmonitor.io/ping/mysql-backup-id
0 3 * * * /backup-files.sh && curl https://cronmonitor.io/ping/files-backup-id
Notifications Not Received #
Email Notifications #
1. Check Spam Folder #
CronMonitor emails might be filtered as spam.
Solution:
- Add [email protected] to your contacts
- Mark emails as "Not Spam"
- Add cronmonitor.io to your domain's SPF/DKIM whitelist
2. Verify Email Address #
Check your notification settings to ensure email is correct.
3. Email Service Issues #
Some corporate email servers have strict filtering.
Solution:
- Try a personal email address for testing
- Contact your IT department about whitelisting
- Use alternative notification channels (Slack, Webhook)
Slack Notifications #
1. Check Channel Permissions #
Ensure the CronMonitor app has permission to post in your channel.
2. Verify Integration #
- Go to Settings β Notifications β Slack
- Check if integration shows as "Connected"
- Try disconnecting and reconnecting
Webhook Notifications #
1. Endpoint Not Reachable #
Test your webhook:
curl -X POST \
-H "Content-Type: application/json" \
-d '{"test": true}' \
https://your-webhook-endpoint.com/webhook
2. Verify Webhook Signature #
Make sure you're validating the signature correctly.
API Issues #
401 Unauthorized #
Causes:
- Expired or invalid API token
- Token not included in request
- Token has wrong format
Solution:
# Check your request
curl -v \
-H "Authorization: Bearer your-api-token" \
https://cronmonitor.io/api/v1/monitors
# Generate new token if needed
429 Rate Limited #
Causes: Exceeded your plan's API rate limit.
Solution:
- Implement exponential backoff
- Cache API responses
- Upgrade to higher plan for more requests
Example backoff:
<?php
function apiRequest($url, $maxRetries = 3) {
$attempt = 0;
while ($attempt < $maxRetries) {
$response = makeApiCall($url);
if ($response->status !== 429) {
return $response;
}
// Exponential backoff: 1s, 2s, 4s
$delay = pow(2, $attempt);
sleep($delay);
$attempt++;
}
throw new Exception('Rate limited after retries');
}
PHP-Specific Issues #
file_get_contents() Fails #
Error:
Warning: file_get_contents(): SSL operation failed
Solution:
<?php
// Option 1: Use cURL instead
$ch = curl_init('https://cronmonitor.io/ping/abc123');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
// Option 2: Configure stream context
$context = stream_context_create([
'ssl' => [
'verify_peer' => true,
'verify_peer_name' => true,
],
'http' => [
'timeout' => 10
]
]);
file_get_contents('https://cronmonitor.io/ping/abc123', false, $context);
allow_url_fopen Disabled #
Error:
Warning: file_get_contents(): https:// wrapper is disabled
Solution: Must use cURL:
<?php
$ch = curl_init('https://cronmonitor.io/ping/abc123');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_exec($ch);
curl_close($ch);
Getting Help #
Before Contacting Support #
-
Check Monitor Status Page
- Visit status.cronmonitor.io
- Check for ongoing incidents
-
Review Recent Changes
- Did you modify your cron schedule?
- Did you update your server?
- Did you change monitor configuration?
-
Collect Debug Information
# Run this diagnostic script echo "=== CronMonitor Diagnostic ===" echo "Date: $(date)" echo "Timezone: $(cat /etc/timezone)" echo "" echo "=== DNS Resolution ===" nslookup cronmonitor.io echo "" echo "=== Connectivity Test ===" curl -I https://cronmonitor.io echo "" echo "=== Ping Test ===" curl -v https://cronmonitor.io/ping/your-monitor-id
Contact Support #
Include this information:
- Monitor ID
- Description of the issue
- Expected behavior vs actual behavior
- Recent changes to your setup
- Diagnostic output from above
- Relevant log entries
Email: [email protected] Chat: Available in dashboard
Community Help #
- GitHub Discussions: github.com/cronmonitor/community
- Stack Overflow: Tag with
cronmonitor
Video Tutorial #
πΊ Watch: "Troubleshooting Common Issues" (12 minutes)
Troubleshooting Guide
Video coming soon
Topics covered:
- Network connectivity issues (3:00)
- Schedule configuration (2:00)
- Notification problems (3:00)
- API troubleshooting (2:00)
- Getting help (2:00)
Quick Reference #
Debug Commands #
# Test ping manually
curl -v https://cronmonitor.io/ping/your-monitor-id
# Check cron logs
grep CRON /var/log/syslog
# View crontab
crontab -l
# Test cron expression
# Use: https://crontab.guru
# Check server time and timezone
date
timedatectl
Common Exit Codes #
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Misuse of shell command |
| 126 | Command not executable |
| 127 | Command not found |
| 130 | Script terminated by Ctrl+C |