auto_scheduling

enables auto scheduling

AutoSchedulingConfig | boolean auto_scheduling;

Available only in PRO Edition

Example

gantt.config.auto_scheduling = {
    enabled: true,
    gap_behavior: "compress"
};
 
gantt.init("gantt_here");


Default value:

object

Related samples

Details

This functionality is available in the PRO edition only.

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

While auto_scheduling config can be set as a boolean, usage of the object definition is the recommended approach for configuring the auto-scheduling behavior.

When set as an object, the following options are available:

enabled

Type: boolean

Default: false

Turns auto-scheduling on or off (same as using a boolean value directly).

gantt.config.auto_scheduling = {
    enabled: true
};

apply_constraints

Type: boolean

Default: true

Enables or disables usage of time constraints for auto scheduling.

gantt.config.auto_scheduling = {
    enabled: true,
    apply_constraints: false
};

Setting the value to false switches auto scheduling to the mode that ignores constraints associated with tasks (e.g. ASAP, ALAP, SNET, etc.) and scheduling depends solely on task dependencies.

This property replaces the deprecated auto_scheduling_compatibility setting.

Related sample:  Basic Scheduling

Related sample:  Constraint Scheduling

gap_behavior

Type: String

Allowed values: "preserve"|"compress"

Default: "preserve"

Defines how Gantt handles gaps between dependent tasks during scheduling.

  • "preserve" - keeps tasks in their current positions if there are no conflicts
  • "compress" - moves tasks to the earliest allowed date (or latest if schedule_from_end is enabled)

By default, tasks are only rescheduled when their current date violates a constraint or dependency.

gantt.config.auto_scheduling = {
    enabled: true,
    apply_constraints: false,
    gap_behavior: "compress"
};

descendant_links

Type: boolean

Default: false

Allows or forbids creating links between parent tasks (projects) and their subtasks.

By default, such links can't be created.

gantt.config.auto_scheduling = {
    enabled: true,
    apply_constraints: false,
    descendant_links: true
};

schedule_on_parse

Type: boolean

Default: true

Defines whether Gantt will do auto-scheduling on data loading/parsing.

gantt.config.auto_scheduling = {
    enabled: true,
    schedule_on_parse: false
};

move_projects

Type: boolean

Default: true

By default (when the property is set to true), the whole project is moved during auto scheduling. It means that all tasks in the project remain on their places relative to each other and the beginning of the project.

If the move_projects property is set to false, auto scheduling will move separate tasks inside of the project. Thus, some tasks will be moved, others will remain on their places.


Note, if you use the constraint scheduling (apply_constraints: true), the move_projects config will be active only when the gap_behavior property is set to "preserve"`:

gantt.config.auto_scheduling = {
    enabled: true,
    apply_constraints: true,
    move_projects: true,
    gap_behavior: "preserve"
};

use_progress

Type: boolean

Default: false

Specifies whether completed tasks should affect scheduling and critical path calculations.

gantt.config.auto_scheduling = {
    enabled: true,
    use_progress: true
};

When the property is enabled, the critical path, slack, and auto scheduling algorithms will take the value of the task progress into account, similar to how these methods work in MS Project, namely:

1) Completed tasks (completed tasks - the tasks with 100% progress) always have zero slack;

2) Completed tasks are excluded from the auto scheduling calculations. Relations that connect predecessors to completed tasks are ignored;

3) Completed tasks can't be critical.

Related sample:  Use progress for auto-scheduling, critical path and slack calculations

schedule_from_end

Type: boolean

Default: false

Enables backward scheduling.

Setting this config to true will switch auto scheduling to the as late as possible mode.

The value will be only applied if project_end is specified as well.

gantt.config.project_end = new Date(2025, 10, 1);
gantt.config.auto_scheduling = {
    enabled: true,
    schedule_from_end: true
};

Related sample:  Backward Scheduling

project_constraint

Type: boolean

Default: false

Defines whether tasks should inherit the constraint type from their parent project.

gantt.config.auto_scheduling = {
    enabled: true,
    project_constraint: true
};

By default, the constraint type of the parent project doesn't affect the constraint type of its nested tasks.

If you set the config to true, the child tasks (except for tasks with their own constraint type) will have the same constraint type as their parent project (for example, finish no later than).

Related sample:  Constraint Scheduling

show_constraints

Type: boolean

Default: false

Controls the display of task constraints on the Gantt chart. Set to true to display constraints or false to hide them.

For example, to enable auto-scheduling but disable the display of task constraints:

gantt.config.auto_scheduling = {
    enabled: true,
    show_constraints: false
};
gantt.init("gantt_here");

Related sample:  Constraints Scheduling

See also
Change log
  • since v9.1, using the object configuration for auto_scheduling is the recommended approach
  • can be set as an object since v9.0
Back to top