# Scheduling Direction
URL: https://pro.rv-grid.com/guides/gantt/scheduling/direction/
Source: src/content/docs/guides/gantt/scheduling/direction.mdx
Description: Configure forward (ASAP) or backward (ALAP) scheduling for your Gantt project.
Forward scheduling is the default and behaves like Microsoft Project's ASAP (As Soon As Possible) direction. Automatic tasks are placed as early as their dependencies and constraints allow.

```typescript
grid.gantt = {
  scheduling: {
    scheduleFrom: 'project-start',
    projectStartDate: '2026-04-06',
  },
};
```

When `projectStartDate` is set, automatic root tasks start from that anchor unless a dependency or constraint moves them later.

## Backward Scheduling (ALAP)

Backward scheduling behaves like Microsoft Project's ALAP (As Late As Possible) project-finish direction:

```typescript
grid.gantt = {
  scheduling: {
    scheduleFrom: 'project-finish',
    projectFinishDate: '2026-06-30',
  },
};
```

Automatic tasks without successors are placed as late as possible against `projectFinishDate`; predecessors are pulled earlier to satisfy outgoing dependencies. If `projectFinishDate` is omitted, the scheduler uses the latest task finish in the current data.

## Example: Project Finish Scheduling

Use project-finish scheduling for ALAP-style plans:

```typescript
grid.gantt = {
  scheduling: {
    scheduleFrom: 'project-finish',
    projectFinishDate: '2026-04-30',
  },
};

grid.source = [
  {
    id: 'build',
    name: 'Build',
    duration: 3,
  },
  {
    id: 'release',
    name: 'Release',
    duration: 1,
  },
];

grid.ganttDependencies = [{
  id: 'build-release',
  predecessorTaskId: 'build',
  successorTaskId: 'release',
  type: 'finish-to-start',
  lagDays: 0,
}];
```

**Expected result**: `release` is placed as late as possible against `2026-04-30`; `build` is pulled earlier so the FS relationship remains valid.

See the [Project-finish ALAP demo](https://demo.rv-grid.com/gantt-alap/ts) for a visible backward-scheduled chain anchored to a project finish date.
