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 . They can also be managed through RESTful endpoints that allow listing, modifying, deleting and creating schedules, as well as disabling and enabling them.

...

To add a schedule to an application extended from AbstractApplication, use the method schedule method schedule. For example, the Purchase example creates a schedule for the PurchaseHistoryWorkflow as follows:

...

Note that through the properties we can indicate to the workflow which schedule triggered it—we it. We could also pass arbitrary other properties.

...

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 API. This can create a dilemma: After modifiying modifying schedules through REST, 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.

...