From 6bcbfeb15dbe89bc444d3120d9e9a67a9a0cccf7 Mon Sep 17 00:00:00 2001 From: Kemi-Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:27:04 +0000 Subject: [PATCH 1/7] feat: added new cron jobs page Added new cron jobs page --- .../application-metrics/cron-metrics.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sites/upsun/src/increase-observability/application-metrics/cron-metrics.md diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md new file mode 100644 index 0000000000..ac20c08dd0 --- /dev/null +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -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: -50 +keywords: + - "cron" + - "jobs" + - "monitor" + - "logs" + - "console" +--- + +You can view your Cron job 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 **Upsun Console**. +2. Navigate to: + - **Services > Apps**, or + - **Services > Workers** (for background jobs). +3. 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** makes it easy to spot 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**. + +## Example + +![Screenshot of Cron job visualization in the Console](../images/cron-visualization.png "0.75") + +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](/manage-resources/crons.html). + +{{< note theme="warning" title="Tip: investigate consistently high durations" >}} +If you notice that your Cron job runtimes are consistently increasing, this may indicate: +- Growing data volumes, +- Inefficient queries, or +- Resource limits being reached. + +Use profiling tools like [Blackfire](/increase-observability/blackfire-for-php-and-python.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](/manage-resources/crons.html) +- [Application metrics](/increase-observability/application-metrics.html) +- [Consume logs](/increase-observability/consume-logs.html) +- [Blackfire for PHP and Python](/increase-observability/blackfire-for-php-and-python.html) From 043f3900d31a32e194ca4da5f1ecdd5eca7eaf43 Mon Sep 17 00:00:00 2001 From: Kemi-Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:27:52 +0000 Subject: [PATCH 2/7] Added note to self Added note about screenshot --- .../increase-observability/application-metrics/cron-metrics.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md index ac20c08dd0..1ca774d3aa 100644 --- a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -46,7 +46,7 @@ This combination of **color** and **height** makes it easy to spot outliers — ## Example -![Screenshot of Cron job visualization in the Console](../images/cron-visualization.png "0.75") +[ADD SCREENSHOT HERE] Each vertical bar corresponds to a single execution. Hover over any bar to view basic details such as: - Execution date and time @@ -55,7 +55,6 @@ Each vertical bar corresponds to a single execution. Hover over any bar to view 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. From 517f790b388ad3cdc15c03cef4244093a646e4fa Mon Sep 17 00:00:00 2001 From: Kemi-Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:13:20 +0000 Subject: [PATCH 3/7] feat: adjusted draft adjusted draft --- .../application-metrics/cron-metrics.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md index 1ca774d3aa..e34da61010 100644 --- a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -10,9 +10,9 @@ keywords: - "console" --- -You can view your Cron job 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. +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.** +Each execution is represented visually, letting you monitor performance trends and failures at a glance. This makes it easier to: @@ -22,9 +22,9 @@ This makes it easier to: ## How to view Cron job executions -1. Open your project in the **Upsun Console**. +1. Open your project in the Console. 2. Navigate to: - - **Services > Apps**, or + - **Services > Apps** or - **Services > Workers** (for background jobs). 3. Click the **Crons** tab to view your scheduled jobs. @@ -32,7 +32,7 @@ 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: +Each execution appears as a vertical bar in the visualization: | Visual element | Meaning | Example | |----------------|----------|----------| @@ -40,35 +40,35 @@ Each execution appears as a **vertical bar** in the visualization: | **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** makes it easy to spot 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**. +This combination of color and height makes it easy to spot outliers, for example: -## Example - -[ADD SCREENSHOT HERE] +- 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. +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](/manage-resources/crons.html). +- **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="warning" title="Tip: investigate consistently high durations" >}} If you notice that your Cron job runtimes are consistently increasing, this may indicate: + - Growing data volumes, -- Inefficient queries, or +- Inefficient queries - Resource limits being reached. -Use profiling tools like [Blackfire](/increase-observability/blackfire-for-php-and-python.html) to identify and resolve performance issues. +Use profiling tools like [Blackfire](/increase-observability/application-metrics/blackfire.html) to identify and resolve performance issues. + {{< /note >}} ## When to check Cron execution history @@ -82,7 +82,7 @@ Use profiling tools like [Blackfire](/increase-observability/blackfire-for-php-a ## Related content -- [Define and schedule Cron jobs](/manage-resources/crons.html) +- [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/consume-logs.html) -- [Blackfire for PHP and Python](/increase-observability/blackfire-for-php-and-python.html) +- [Consume logs](/increase-observability/logs.html) +- [Blackfire for PHP and Python](/increase-observability/application-metrics/blackfire.html) From 1a685cf9e6df576af7614c92adbe408acf34eda8 Mon Sep 17 00:00:00 2001 From: Kemi Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:55:03 +0000 Subject: [PATCH 4/7] Apply suggestion from @Kemi-Elizabeth --- .../increase-observability/application-metrics/cron-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md index e34da61010..caa66382d6 100644 --- a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -1,7 +1,7 @@ --- title: Monitor Cron job executions description: Learn how to visualize and interpret your Cron job runs directly in the console. -weight: -50 +weight: -5 keywords: - "cron" - "jobs" From 7cf4833125c7a70ee8bda7a53143155c75c8bcbf Mon Sep 17 00:00:00 2001 From: Kemi Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:55:28 +0000 Subject: [PATCH 5/7] Apply suggestion from @Kemi-Elizabeth --- .../increase-observability/application-metrics/cron-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md index caa66382d6..054053b99c 100644 --- a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -60,7 +60,7 @@ Click a bar to open the detailed execution log, where you can inspect errors or - **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="warning" title="Tip: investigate consistently high durations" >}} +{{< note theme="warning" title="Investigate consistently high durations" >}} If you notice that your Cron job runtimes are consistently increasing, this may indicate: - Growing data volumes, From b784e9cd295f8a9225cbbc8d067231da9e11f17a Mon Sep 17 00:00:00 2001 From: Kemi Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:48:34 +0000 Subject: [PATCH 6/7] Apply suggestion from @Kemi-Elizabeth --- .../increase-observability/application-metrics/cron-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md index 054053b99c..83633f8430 100644 --- a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -40,7 +40,7 @@ Each execution appears as a vertical bar in the visualization: | **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 makes it easy to spot outliers, for example: +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. From 5a8d732ea4c641033e7fc4cf02c7ced20c81a408 Mon Sep 17 00:00:00 2001 From: Kemi-Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Fri, 7 Nov 2025 15:35:50 +0000 Subject: [PATCH 7/7] feat: made suggested changes made changes suggested by Paul --- .../application-metrics/cron-metrics.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md index 83633f8430..0d34866f42 100644 --- a/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md +++ b/sites/upsun/src/increase-observability/application-metrics/cron-metrics.md @@ -23,10 +23,11 @@ This makes it easier to: ## How to view Cron job executions 1. Open your project in the Console. -2. Navigate to: - - **Services > Apps** or - - **Services > Workers** (for background jobs). -3. Click the **Crons** tab to view your scheduled jobs. +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. @@ -60,7 +61,7 @@ Click a bar to open the detailed execution log, where you can inspect errors or - **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="warning" title="Investigate consistently high durations" >}} +{{< 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,