|
| 1 | +--- |
| 2 | +title: Monitor Cron job executions |
| 3 | +description: Learn how to visualize and interpret your Cron job runs directly in the console. |
| 4 | +weight: -5 |
| 5 | +keywords: |
| 6 | + - "cron" |
| 7 | + - "jobs" |
| 8 | + - "monitor" |
| 9 | + - "logs" |
| 10 | + - "console" |
| 11 | +--- |
| 12 | + |
| 13 | +You can view your [Cron job](/create-apps/app-reference/single-runtime-image.html#crons) executions directly from your project’s Services > Apps or Services > Workers pages. This visualization helps you quickly understand how scheduled jobs are performing and spot unusual patterns without manually checking logs. |
| 14 | + |
| 15 | +Each execution is represented visually, letting you monitor performance trends and failures at a glance. |
| 16 | + |
| 17 | +This makes it easier to: |
| 18 | + |
| 19 | +- Verify that scheduled jobs are running on time. |
| 20 | +- Identify failed or unusually long-running jobs. |
| 21 | +- Drill into logs only when something looks wrong. |
| 22 | + |
| 23 | +## How to view Cron job executions |
| 24 | + |
| 25 | +1. Open your project in the Console. |
| 26 | +2. Select your chosen Environment. |
| 27 | +3. Navigate to: |
| 28 | + - Services --> Apps & Services --> Apps --> app |
| 29 | + - Services --> Apps & Services --> Apps --> Workers (for background jobs). |
| 30 | +4. Click the **Crons** tab to view your scheduled jobs. |
| 31 | + |
| 32 | +Each Cron job displays a visual history of its executions over time. |
| 33 | + |
| 34 | +## Understanding the visualization |
| 35 | + |
| 36 | +Each execution appears as a vertical bar in the visualization: |
| 37 | + |
| 38 | +| Visual element | Meaning | Example | |
| 39 | +|----------------|----------|----------| |
| 40 | +| **Color** | Indicates success or failure. | Green = success, Red = failure | |
| 41 | +| **Height** | Proportional to the job’s execution time. | Taller bars indicate longer runtimes | |
| 42 | +| **Click a bar** | Opens detailed logs for that specific run. | Review stdout/stderr for debugging | |
| 43 | + |
| 44 | +This combination of color and height helps in spotting outliers, for example: |
| 45 | + |
| 46 | +- A sudden tall red bar indicates a failed job that took longer than usual. |
| 47 | +- Consistently tall green bars suggest a job that may need optimization. |
| 48 | + |
| 49 | +Each vertical bar corresponds to a single execution. Hover over any bar to view basic details such as: |
| 50 | + |
| 51 | +- Execution date and time |
| 52 | +- Duration |
| 53 | +- Status (success/failure) |
| 54 | + |
| 55 | +Click a bar to open the detailed execution log, where you can inspect errors or performance information. |
| 56 | + |
| 57 | +## Troubleshooting and best practices |
| 58 | + |
| 59 | +- **Monitor for patterns**: Look for recurring red (failed) bars or progressively longer runtimes. |
| 60 | +- **Drill into logs**: Clicking a bar takes you directly to logs for that specific execution. |
| 61 | +- **Correlate with metrics**: Combine this view with [application metrics](/increase-observability/application-metrics.html) to identify performance bottlenecks. |
| 62 | +- **Adjust Cron timing**: If jobs overlap or run too frequently, adjust their schedule in your [`crons` configuration](/create-apps/app-reference/single-runtime-image.html#crons). |
| 63 | + |
| 64 | +{{< note theme="info" title="Investigate consistently high durations" >}} |
| 65 | +If you notice that your Cron job runtimes are consistently increasing, this may indicate: |
| 66 | + |
| 67 | +- Growing data volumes, |
| 68 | +- Inefficient queries |
| 69 | +- Resource limits being reached. |
| 70 | + |
| 71 | +Use profiling tools like [Blackfire](/increase-observability/application-metrics/blackfire.html) to identify and resolve performance issues. |
| 72 | + |
| 73 | +{{< /note >}} |
| 74 | + |
| 75 | +## When to check Cron execution history |
| 76 | + |
| 77 | +| Use case | Why it’s useful | |
| 78 | +|-----------|----------------| |
| 79 | +| **Autoscaling investigations** | Understand whether jobs are driving unexpected CPU or memory spikes. | |
| 80 | +| **Deployment monitoring** | Verify that scheduled jobs resume normally after deployments. | |
| 81 | +| **Job failure analysis** | Quickly locate the time and context of a failed execution. | |
| 82 | +| **Performance tuning** | Spot trends in runtime duration and optimize resource usage. | |
| 83 | + |
| 84 | +## Related content |
| 85 | + |
| 86 | +- [Define and schedule Cron jobs](/create-apps/app-reference/single-runtime-image.html#crons) |
| 87 | +- [Application metrics](/increase-observability/application-metrics.html) |
| 88 | +- [Consume logs](/increase-observability/logs.html) |
| 89 | +- [Blackfire for PHP and Python](/increase-observability/application-metrics/blackfire.html) |
0 commit comments