Skip to main content

schedule-tasks

The functionality is available in PRO Edition onlyPRO

Description

Triggers cascading updates of tasks in auto scheduling mode

The schedule-tasks action triggers recalculation of all tasks according to auto scheduling rules. It updates all dependent tasks based on end-to-start links, considering lag and project start constraints. Normally, this action is called automatically when tasks change (start, end, duration, or links), but it can also be invoked manually.

Usage

"schedule-tasks": () => void;

Parameters

The callback of the action takes no parameters.

Example

<script>
import { Gantt } from "@svar/svelte-gantt";
import { Button } from "@svar-ui/svelte-core";
import { getData } from "../data";

const { tasks, links } = getData();

let api = $state();

function runSchedule() {
api.exec("schedule-tasks", {});
}
</script>

<Button onclick={runSchedule}>Apply Auto Schedule</Button>
<Gantt bind:this={api} {tasks} {links} schedule={{ auto: true }} />

Related articles: