C3 AI Documentation Home

Default Cron Jobs

The C3 Agentic AI Platform runs cron jobs to schedule tasks that run automatically at specific times or intervals, or upon user-initiated requests. These cron jobs automate essential maintenance, data management, and operational tasks across the cluster, environment, and application levels.

Review the following default cron jobs and their settings to understand their purposes in the C3 Agentic AI Platform.

Default cron jobs in the C3 Agentic AI Platform

The following cron jobs are seeded in every C3 AI application. Each cron job calls a specific Type and method to perform its operation and has a default active or inactive setting:

Cron JobDescriptionAssociated TypeMethodActive or InactiveSchedule
clean-failed-resourcesCleans up resources that have failed or are in an error state.K8sCleanupUtilremoveFailedPodsInactiveEvery 10 minutes
clean-user-event-loginRemoves or archives old user login event records.UsercleanupLoginEventsActiveWeekly (Sunday at midnight)
close-merged-jira-tickets-c3ciCloses JIRA tickets merged via the C3CI process.TascloseMergedJiraTicketsInactiveEvery 2 hours
close-merged-jira-ticketsCloses JIRA tickets that have been merged, regardless of process.TascloseMergedJiraTicketsInactiveHourly
console-notebook-cleanupDeletes or archives old or unused console notebook files.ImplLanguage.SessioncleanupExpiredSessionsActiveDaily at midnight
ex-machina-checkShutdownChecks for and initiates shutdown of idle or unnecessary Ex Machina instances.ExMachinaSessioncheckShutdownActiveEvery 5 minutes
ex-machina-instance-update-statusesUpdates the status of Ex Machina instances based on current state.ExMachinaInstance.Status.ControllerupdateStatusesActiveEvery 15 seconds
ex-machina-manage-pending-invitationsManages and cleans up pending invitations in Ex Machina.ExMachinaUserManagementmanagePendingInvitationsInactiveDaily at midnight
ex-machina-manage-pending-requestsHandles and clears pending requests in Ex Machina.ExMachinaApprovalRequestmanagePendingRequestsInactiveDaily at midnight
ex-machina-report-monthly-usageGenerates monthly usage reports for Ex Machina.ExMachinaUsageReportgenerateForPreviousMonthActiveMonthly (1st day at 00:10)
ex-machina-shutdown-sessions-for-completed-schedulesShuts down sessions in Ex Machina that are no longer needed after schedules complete.ExMachinaSessionshutdownSessionsForCompletedRunsActiveEvery 5 minutes
ex-machina-start-unassigned-instancesStarts Ex Machina instances that are unassigned but required.ExMachinaInstancestartUnassignedInstancesInactiveHourly
expire-disclosure-reviewExpires disclosure review records that have passed their review period.DisclosureReviewRequestupdateExpiredActiveDaily
export-app-telemetry-mappingExports telemetry mapping data for application monitoring.TelemetryMappingExporterexportAppTelemetryMappingActiveEvery 15 minutes
gc-feature-store-blocksPerforms garbage collection on feature store blocks to free up space.Feature.Store.BlockgcInactiveDaily at 2am
norm-hot-cold-migratorMigrates data between hot and cold storage tiers for optimal performance and cost.NormalizedTimeseriesHotColdMigratortriggerInactiveMonthly (4th day at midnight)
periodic-heaphistogram-exportPeriodically exports heap histogram data for memory analysis.AppdumpJvmHeapHistogramInactiveDaily at midnight
periodic-tmpfilesystem-cleanupCleans up temporary filesystems to reclaim disk space.TmpFileSystemreapTmpFilesInactiveEvery 8 hours
prune-tas-known-issuesRemoves or archives known issues in the TAS (Test Automation System).TaspruneKnownIssuesInactiveDaily at 2am
seed-nodepool-autoscaler-cronjobsSeeds cron jobs for node pool autoscaling.App.NodePool.AutoScaleStrategy.CronJobseedScalingCronJobsActiveEvery minute
self_healing_request_recoveryAttempts to recover failed or stuck requests automatically.C3RequestReconcilerprocessAllActiveEvery minute
spark-clean-idle-clusterCleans up idle Spark clusters to save resources.SparkClusterstopIdleClusterInactiveEvery 10 minutes
validate-db-schemaValidates the database schema for consistency and correctness.Db.TypeSchemavalidateSchemasActiveDaily at 5am
workflow-run-cleanupCleans up completed or failed workflow runs.WorkflowremoveStaleInstancesActiveDaily at midnight
workflow-run-recoverAttempts to recover or restart failed workflow runs.Workflow.RunrecoverStuckActiveEvery 30 minutes

Default cron jobs in C3 AI Studio

The following cron jobs start, stop, resume, upgrade, and terminate environment-level and application-level C3 AI Studio instances based on user-initiated requests:

Cron JobDescriptionAssociated TypeMethodActive or InactiveSchedule
startStudioEnvsAppsStarts an environment-level or application-level C3 AI Studio instance.Cluster for environment or Env for applicationstartEnv or startAppActiveUser initiated in C3 AI Studio
stopStudioEnvsAppsStops an environment-level or application level C3 AI Studio instance.Cluster for environment or Env for applicationstopEnv or stopAppActiveUser initiated in C3 AI Studio
resumeStudioEnvsAppsResumes an environment or application.Cluster for environment or Env for applicationresumeEnv or resumeAppUser initiatedUser initiated in C3 AI Studio
upgradeStudioEnvsAppsUpgrades an environment or application.EnvUpgradeAppByIdActiveUser initiated in C3 AI Studio
terminateStudioEnvsAppsTerminates an environment or application.Cluster for environment or Env for applicationterminateEnv or terminateAppActiveUser initiated in C3 AI Studio
refreshStudioEnvsAppsFetches all environments and applications in the cluster, creates C3 AI Studio instances for environments and applications created outside of the C3 AI Studio instance, marks unresponsive C3 AI Studio instances as unreachable, and removes C3 AI Studio instances for environments or applications terminated outside of the C3 AI Studio instance.StudioClusterrefreshStudioEnvsAppsActiveEvery 5 minutes

Hibernation cron jobs in C3 AI Studio

C3 AI Studio runs the following cron jobs to regularly to hibernate inactive environments and applications to conserve resources:

Cron JobDescriptionAssociated TypeMethodActive or InactiveSchedule
scheduleBasedHibernationHibernates all environments and applications at a set cycle, except for ones excluded by a C3.StudioAdmin user.StudioCluster.HibernationprocessScheduledActiveDaily at 4am
activityBasedHibernationHibernates single node environments (SNEs) and their applications. Only applies to environments on C3 AI server versions 8.4.0 and lower.StudioCluster.HibernationprocessInactiveActiveEvery 15 minutes

Activity cron jobs in C3 AI Studio

C3 AI Studio runs the following cron jobs to clean up error-level and stale activities:

Cron JobDescriptionAssociated TypeMethodActive or InactiveSchedule
cleanUpErrorLevelStudioAppActivitiesCleans up error-level application activities according to limit configuration in StudioClusterConfig to avoid overwhelming the database.StudioClustercleanUpErrorLevelActivitiesActiveDaily at midnight
cleanUpErrorLevelStudioEnvActivitiesCleans up error-level environment activities according to limit configuration in StudioCluster to avoid overwhelming the database.StudioClustercleanUpErrorLevelActivitiesActiveEvery hour at the start of the hour
cleanUpStaleStudioEnvAppActivitiesCleans up stale environment-level and application-level C3 AI Studio activities based on activityRetentionPeriod configuration in StudioActivityLogConfig.StudioClustercleanUpStaleActivitiesActiveDaily at midnight

View cron jobs

To view all cron jobs, run the following code in the cluster (c3-c3), environment, or application C3 AI Console:

JavaScript
CronJob.fetch()

To view a single cron job and its details, run the following code in the cluster (c3-c3), environment, or application C3 AI Console:

JavaScript
CronJob.forId("<cron id>")

Replace <cron id> with the name of the cron job you want to view.

Set a cron job to active or inactive

To set a cron job to active or inactive, run the following code in the cluster (c3-c3), environment, or application C3 AI Console:

JavaScript
CronJob.forId("<cron id>").withField("inactive", <true or false>).upsert()

Replace <cron id> with the name of the cron job you want to set. Set the "inactive" field to true or false to disable or enable the cron job.

Troubleshoot cron jobs

To check the status of a previously run cron job, run the following code in the cluster (c3-c3), environment, or application C3 AI Console:

JavaScript
CronJob.forId("<cron id>").lastRun()

Replace <cron id> with the name of the cron job you want to view.

This code returns cron job information such as execution attempts, the job ID, status, and more.

Or, run the following code to check the status of multiple runs for a cron job:

JavaScript
CronJob.forId("<cron id>").lastRuns(<#>)

Replace <cron id> with the name of the cron job and <#> with the number of runs you want to view.

Example

The following example demonstrates how to perform simple troubleshooting on a default cron job.

The cron job clean-failed-resources defaults to an inactive state. Run the following code in an application C3 AI Console to enable it for the application:

JavaScript
CronJob.forId("clean-failed-resources").withField("inactive", false).upsert()

If set to active, this cron job runs every 10 minutes. After 10 minutes, run the following code to check the status of the cron job:

JavaScript
CronJob.forId('clean-failed-resources').lastRun()

Review the output and notice the following error and status fields:

Text
error : {message: 'API can be executed only on c3-c3', httpStatusCode: 0, action: 'K8sCleanupUtil#removeFailedPods', engine: 'java-server-java', timestamp: {…}, …}
Text
status: "FAILED"

The response provides a status and error field that you can use to troubleshoot. In this example, the cron job clean-failed-resources failed because you can only enable it on the c3-c3 cluster level.

Consider the resources required to run a cron job. For example, the clean-failed-resources cron job clears failed resources in the node that the job is active on. If you were to enable this cron job on all applications in a cluster, then it would overwhelm the server with unnecessary calls.

However, it's useful to enable this cron job at the cluster (c3-c3) level, because c3-c3 is the control plane responsible for maintaining cluster health. Calls to clean up resources at the cluster level are more optimal than calls to clean up resources on many applications.

Run the following code to enable clean-failed-resources again, but this time in the cluster (c3-c3) C3 AI console:

JavaScript
CronJob.forId("clean-failed-resources").withField("inactive", false).upsert()

After 10 minutes, run the following code to check the status of the cron job:

JavaScript
CronJob.forId('clean-failed-resources').lastRun()

The output indicates the the cron job ran successfully:

Text
status: "SUCCESS"

See also

Was this page helpful?