Skip to main content

onBeforeTaskAutoSchedule

info

This functionality is available in the PRO edition only.

Description

Fires for each task which is rescheduled

onBeforeTaskAutoSchedule: (task: Task, start: Date, link: Link, predecessor: Task) => boolean;

Parameters

  • task - (required) Task - the task object
  • start - (required) Date - a new start date
  • link - (required) Link - the link object that creates the constraint
  • predecessor - (required) Task - the predecessor task object

Returns

  • result - (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onBeforeTaskAutoSchedule",function(task, start, link, predecessor){
// any custom logic here
return true;
});

Details

note

This event is defined in the auto_scheduling extension, so you need to activate the auto_scheduling plugin. Read the details in the Auto Scheduling article.

The event is blockable. Returning false will cancel further processing.