Engine.schedule#
Schedules a ProjectData snapshot once and returns the result. The call is stateless: it's the same as new Project().solve(data, options) on a temporary Project that's discarded when the call returns. Nothing is kept between calls. For a project that receives edits after the first schedule, use Project#solve.
Signature#
public static ScheduleResult
Synchronous and CPU-only. The same data and options always produce the same result.
Parameters#
| Name | Type | Description |
|---|---|---|
data |
ProjectData |
The full snapshot to schedule. Must not be null |
options |
SolveOptions |
Subtree, analytics and reporting switches. new SolveOptions() schedules the whole project. Must not be null |
Behavior#
data is deep-copied before scheduling, so the call never changes the caller's object. Validation always runs with Validation.STRICT.
Returns#
The ScheduleResult. Its baselineId is set, but it names the baseline of the temporary project, so no later call can use it.
Errors#
All exceptions are unchecked.
| Error | When |
|---|---|
InputException |
data fails strict validation. The rules are listed on ProjectData |
NullPointerException |
data or options is null |
schedule never throws ProjectException: each call starts from a fresh project.
Example#
;
;
Related#
SolveOptions- subtree, analytics and reporting switchesScheduleResult- the scheduled dates, conflicts and analytics it returnsProject#solve- the stateful call that keeps the project for later edits- One-shot scheduling - when to schedule a snapshot without a project
- Quick start - scheduling two linked tasks end to end