Skip to main content

schedule

The functionality is available in PRO Edition only

PRO

Description

Enables automatic task scheduling based on end-to-start dependencies

The schedule property activates automatic scheduling in Gantt. It controls whether task dependencies trigger cascading scheduling changes. When enabled, the system automatically adjusts dependent tasks according to end-to-start links, ensuring that successor tasks always start after their predecessors.

This is a forward-only scheduling mode: changes propagate from a task to its successors.

Usage

schedule?: {
auto?: boolean;
};

Parameters

  • true - enables automatic scheduling
  • false - disables automatic scheduling

When automatic scheduling is enabled:

  • End-to-start dependencies are enforced at all times
  • On initial load, all successor tasks are shifted forward to start after their predecessors
  • When a task start, end, or duration changes, all successors are automatically recalculated and moved if needed
  • Backward movement respects constraints - tasks cannot be moved earlier than allowed by their predecessor’s end
  • The onScheduleTask event fires whenever cascading updates occur
  • End-to-start links support the lag property (fixed or flexible delays)
  • Invalid links (circular or summary -> children) are automatically removed on load and during editing
  • If projectStart is defined, all tasks are shifted forward so that the earliest task starts exactly at the project start date, and all others preserve the same relative offset.

Example

import { Gantt } from "@svar/react-gantt";
import { getData } from "../data";

export default function App() {
const data = getData("basic");

return (
<Gantt
tasks={data.tasks}
links={data.links}
schedule={{ auto: true }}
onScheduleTask={(event) => {
// handle cascading scheduling updates
// event contains details about updated tasks/links
}}
/>
);
}

Related articles: