Scheduling policies with a cron expression using REST APIs

Define a Quartz-style cron expression and optional timezone in policy resources so Cloudera Lakehouse Optimizer evaluates associated tables on a recurring schedule.

Cron expressions define when Cloudera Lakehouse Optimizer runs the evaluation phase for schedule-based policies. Cron syntax follows the Quartz scheduler format (for example, 0 0 4 * * ? * runs daily at 04:00). For syntax details, see Quartz cron triggers or an online CRON expression generator.

Upload a JSON constants file that includes cron and, when required, timezone alongside action constants. For field examples, see JSON file and Clouderaadaptive Resources. For the Restish equivalent, see Scheduling policies with a cron expression using the CLI.

  1. Upload policy resources that include a cron expression.
    Use PUT /policies/resource or PATCH /policies/resource. For steps, see Defining resources using REST APIs.
  2. Reschedule the namespace with PATCH /namespaces/{namespace}.
Cloudera Lakehouse Optimizer initiates table maintenance according to the CRON schedule in the policy. For on-demand runs, see Running policies on demand using REST APIs.