Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Schedules are used to automate the execution of workflows on a recurring time basis, on data availability, on certain statuses reached by another program, or a logical combination of the conditions mentioned previously. The schedules of an application can be added as part of application configuration. They can also be managed through RESTful Microservices endpoints that allow listing, modifying, deleting and creating schedules, as well as disabling and enabling them.

...

Schedules can be added and controlled by the CDAP CLI and the Lifecycle HTTP RESTful APIMicroservices. The status of a schedule can be retrieved, and individual schedules can be added, enabled, or disabled.

...

  • Create: This happens either as part of application deployment or through the Lifecycle HTTP RESTful APIMicroservices. After creating a schedule, it is initially disabled and will not execute any jobs.

  • Disable: Disabling a schedule will delete all pending jobs for the schedule from the job queue, and prevent new jobs from being created. This action will not suspend or abort any current execution of the workflow.

  • Enable: This action will put the schedule back into an active state, after a Disable action. Note that if the schedule was previously disabled, that aborted all pending jobs for the schedule. Therefore new triggers have to create new jobs for this schedule before its workflow is executed again.

  • Delete: This first disables the schedule and then permanently deletes it.

  • Update: This is equivalant to deleting the current schedule and creating a new one. It happens either when an application which contains a schedule is redeployed in CDAP, or through the Lifecycle HTTP RESTful APIMicroservices.

Application Deployment and Schedules

Schedules can be defined as part of application deployment, by calling schedule() in the application's configure() method; or they can be managed separately from application deployment through the HTTP RESTful APICDAP Microservices. This can create a dilemma: After modifying schedules through RESTCDAP Microservices, redeploying the application, which may happen for reasons unrelated to the schedules, would undo all those changes and reinstate the schedules defined by the configure() method. Because that is undesired, CDAP provides an option to configure whether schedules are controlled by the configure() method or not. This option is called app.deploy.update.schedules and is given as a field of the application deployment request.

...