Skip to main content

Executions

Track, monitor, and debug your job runs.

Understanding Executions​

Every time a job runs, it creates an execution. For one-time jobs, there's typically one execution. For CronJobs, each scheduled run creates a new execution.

Execution States​

StateDescriptionActions Available
PendingExecution is being scheduledCancel
RunningExecution is in progressView logs, Cancel
SucceededExecution completed successfullyView logs, View metrics
FailedExecution failed after all retriesView logs, Retry

Viewing Executions​

From the Jobs List​

The Jobs list shows summary information:

ColumnDescription
NameJob name
TypeJob or CronJob
StatusCurrent state
ScheduleCron expression (CronJobs only)
Last RunTime of last execution
Next RunScheduled time for next execution
CompletionsSucceeded / Failed count
Active JobsCurrently running executions

Executions Tab​

Navigate to your job and click Executions to see:

  • Complete execution history
  • Status of each run
  • Start and end times
  • Duration
  • Success/failure status

Execution Details​

Click on an execution to view:

Overview​

  • Status: Current execution state
  • Started: When execution began
  • Completed: When execution finished (if applicable)
  • Duration: Total runtime
  • Retries: Number of retry attempts
  • Diagnostic: When available, a card showing the root cause of the failure, actionable suggestions, and sanitized technical details

Logs​

View real-time and historical logs:

  • stdout: Standard output from your job
  • stderr: Error output
  • Timestamps: When each line was logged
  • Filtering: Search through logs
Log Best Practices

Include clear progress indicators in your job output to help with debugging.

Events​

Track execution lifecycle events:

EventDescription
Scheduled Execution CreatedCronJob created this execution
Job Execution StartedExecution has begun
Instance ScheduledPod assigned to a node
Downloading ImagePulling container image
Image DownloadedImage pull complete
Instance CreatedPod created
StartedContainer started running
Completed SuccessfullyJob finished without errors
Execution FinishedExecution completed

Metrics​

View resource usage during execution:

  • CPU Usage: Actual CPU consumption over time
  • Memory Usage: Memory consumption over time
  • Duration: Execution timeline

Managing Executions​

Run a CronJob Now​

Trigger an immediate execution outside the schedule:

  1. Go to your CronJob
  2. Click Run Now
  3. A new execution starts immediately

This doesn't affect the regular schedule.

Cancel an Execution​

Stop a running execution:

  1. Find the running execution
  2. Click Cancel or Stop
  3. Execution is terminated
Cancellation

Cancelled executions may leave work incomplete. Design jobs to handle interruption gracefully.

Retry a Failed Execution​

For failed jobs:

  1. View the failed execution
  2. Check logs to understand the failure
  3. Click Retry to run again

Or create a new one-time job with the same configuration.

Completions Tracking​

For jobs with multiple completions:

FieldDescription
SucceededNumber of successful pod completions
FailedNumber of failed pod completions
TotalTotal completions required

Example: A job with completions=10, parallelism=3:

  • Shows "7 / 10" when 7 pods succeeded
  • Shows "10 / 10" when complete

Execution History​

Retention​

CronJobs retain a limited history:

SettingDefaultPurpose
Successful Jobs History3Recent successful runs
Failed Jobs History1Recent failures for debugging

Older executions are automatically deleted.

Viewing Historical Data​

Even after execution cleanup, you can still access:

  • Logs: Retained in the logging system
  • Metrics: Retained in the metrics system

Troubleshooting Executions​

When an execution fails, check the diagnostic card on the execution detail page first — it identifies the root cause and suggests fixes. If no diagnostic is available, use the approaches below.

Execution Stuck in Pending​

Causes:

  • Insufficient cluster resources
  • Node scheduling constraints
  • Image pull issues

Solutions:

  1. Check Events for scheduling errors
  2. Verify image exists and is accessible
  3. Check resource requests aren't too high

Execution Failed Immediately​

Causes:

  • Invalid command
  • Missing environment variables
  • Permission errors

Solutions:

  1. Check Logs for error messages
  2. Verify command syntax
  3. Ensure all required variables are set
  4. Check security context configuration

Execution Runs Forever​

Causes:

  • Job stuck in infinite loop
  • Waiting for unavailable resource
  • No proper exit condition

Solutions:

  1. Add timeout with activeDeadlineSeconds
  2. Check logs for stuck state
  3. Cancel and fix the job logic

Execution Keeps Failing​

Causes:

  • Persistent error condition
  • Resource exhaustion
  • External dependency failure

Solutions:

  1. Review logs across multiple attempts
  2. Check if error is transient or permanent
  3. Lower backoff limit to fail faster
  4. Fix underlying issue before retry

Parallel Execution Tracking​

For jobs with parallelism > 1:

Indexed Jobs​

Each pod receives a unique index:

  • Environment variable: JOB_COMPLETION_INDEX
  • Values: 0 to (completions - 1)

Example with completions=5, parallelism=2:

  • First batch: Pods with index 0, 1
  • Second batch: Pods with index 2, 3
  • Third batch: Pod with index 4

Non-Indexed Jobs​

All pods perform the same work. Use external coordination if needed.

Best Practices​

Monitoring​

  1. Set up alerts for failed executions
  2. Review logs regularly even for successful jobs
  3. Track duration trends to catch performance degradation

Reliability​

  1. Design for failure: Assume executions can fail
  2. Idempotent operations: Safe to run multiple times
  3. Clear success criteria: Know what "done" means

Performance​

  1. Right-size parallelism: Match to work characteristics
  2. Avoid over-scheduling: Don't run more often than needed
  3. Monitor resource usage: Optimize based on actual consumption