Interface ModelSchedulesContextReadWrite.NewScheduleBuilder

Enclosing interface:
ModelSchedulesContextReadWrite

public static interface ModelSchedulesContextReadWrite.NewScheduleBuilder
A builder object helping to add or update a model schedule.

The following code creates (or updates if already existing) a ModelSchedule named "mySchedule" which will run "refresh_model" action every 7 days from 01/01/2020 12:42

 model.schedulesContext().newSchedule("mySchedule")
                         .setStartDate(api.parseDateTime("yyyy-MM-dd'T'HH:mm:ss", "2020-01-01T12:42:00"))
                         .setPeriod(7, PeriodUnit.DAY)
                         .setAction("refresh_model")
                         .addOrUpdate()
 
The time value of the start date is important when the period is greater or equal to one day as it will define the time of the day the model action will be executed. In the previous example, every 7 days the action will be executed at 12:42.
Since:
11.0 Paper Plane