-
Notifications
You must be signed in to change notification settings - Fork 348
5179 cron tab visualisation #5181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6bcbfeb
feat: added new cron jobs page
Kemi-Elizabeth 043f390
Added note to self
Kemi-Elizabeth 517f790
feat: adjusted draft
Kemi-Elizabeth fecc0ba
Merge branch 'main' into 5179-cron-tab-visualisation
Kemi-Elizabeth 1a685cf
Apply suggestion from @Kemi-Elizabeth
Kemi-Elizabeth 7cf4833
Apply suggestion from @Kemi-Elizabeth
Kemi-Elizabeth b784e9c
Apply suggestion from @Kemi-Elizabeth
Kemi-Elizabeth 5a8d732
feat: made suggested changes
Kemi-Elizabeth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
89 changes: 89 additions & 0 deletions
89
sites/upsun/src/increase-observability/application-metrics/cron-metrics.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| --- | ||
| title: Monitor Cron job executions | ||
| description: Learn how to visualize and interpret your Cron job runs directly in the console. | ||
| weight: -5 | ||
| keywords: | ||
| - "cron" | ||
| - "jobs" | ||
| - "monitor" | ||
| - "logs" | ||
| - "console" | ||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| Each execution is represented visually, letting you monitor performance trends and failures at a glance. | ||
|
|
||
| This makes it easier to: | ||
|
|
||
| - Verify that scheduled jobs are running on time. | ||
| - Identify failed or unusually long-running jobs. | ||
| - Drill into logs only when something looks wrong. | ||
|
|
||
| ## How to view Cron job executions | ||
|
|
||
| 1. Open your project in the Console. | ||
| 2. Select your chosen Environment. | ||
| 3. Navigate to: | ||
| - Services --> Apps & Services --> Apps --> app | ||
| - Services --> Apps & Services --> Apps --> Workers (for background jobs). | ||
| 4. Click the **Crons** tab to view your scheduled jobs. | ||
|
|
||
| Each Cron job displays a visual history of its executions over time. | ||
|
|
||
| ## Understanding the visualization | ||
|
|
||
| Each execution appears as a vertical bar in the visualization: | ||
|
|
||
| | Visual element | Meaning | Example | | ||
| |----------------|----------|----------| | ||
| | **Color** | Indicates success or failure. | Green = success, Red = failure | | ||
| | **Height** | Proportional to the job’s execution time. | Taller bars indicate longer runtimes | | ||
| | **Click a bar** | Opens detailed logs for that specific run. | Review stdout/stderr for debugging | | ||
|
|
||
| This combination of color and height helps in spotting outliers, for example: | ||
|
|
||
| - A sudden tall red bar indicates a failed job that took longer than usual. | ||
| - Consistently tall green bars suggest a job that may need optimization. | ||
|
|
||
| Each vertical bar corresponds to a single execution. Hover over any bar to view basic details such as: | ||
|
|
||
| - Execution date and time | ||
| - Duration | ||
| - Status (success/failure) | ||
|
|
||
| Click a bar to open the detailed execution log, where you can inspect errors or performance information. | ||
|
|
||
| ## Troubleshooting and best practices | ||
|
|
||
| - **Monitor for patterns**: Look for recurring red (failed) bars or progressively longer runtimes. | ||
| - **Drill into logs**: Clicking a bar takes you directly to logs for that specific execution. | ||
| - **Correlate with metrics**: Combine this view with [application metrics](/increase-observability/application-metrics.html) to identify performance bottlenecks. | ||
| - **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). | ||
|
|
||
| {{< note theme="info" title="Investigate consistently high durations" >}} | ||
| If you notice that your Cron job runtimes are consistently increasing, this may indicate: | ||
|
|
||
| - Growing data volumes, | ||
| - Inefficient queries | ||
| - Resource limits being reached. | ||
|
|
||
| Use profiling tools like [Blackfire](/increase-observability/application-metrics/blackfire.html) to identify and resolve performance issues. | ||
|
|
||
| {{< /note >}} | ||
|
|
||
| ## When to check Cron execution history | ||
|
|
||
| | Use case | Why it’s useful | | ||
| |-----------|----------------| | ||
| | **Autoscaling investigations** | Understand whether jobs are driving unexpected CPU or memory spikes. | | ||
| | **Deployment monitoring** | Verify that scheduled jobs resume normally after deployments. | | ||
| | **Job failure analysis** | Quickly locate the time and context of a failed execution. | | ||
| | **Performance tuning** | Spot trends in runtime duration and optimize resource usage. | | ||
|
|
||
| ## Related content | ||
|
|
||
| - [Define and schedule Cron jobs](/create-apps/app-reference/single-runtime-image.html#crons) | ||
| - [Application metrics](/increase-observability/application-metrics.html) | ||
| - [Consume logs](/increase-observability/logs.html) | ||
| - [Blackfire for PHP and Python](/increase-observability/application-metrics/blackfire.html) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.