# Task Constraints
URL: https://pro.rv-grid.com/guides/gantt/scheduling/constraints/
Source: src/content/docs/guides/gantt/scheduling/constraints.mdx
Description: Apply explicit date constraints like SNET, MSO, and MFO to control the scheduler's behavior.
Constraints are explicit fields on a task that override or refine the automatic forward-pass scheduling:

```typescript
{
  id: 'integration',
  name: 'External Integration',
  constraintType: 'start-no-earlier-than',
  constraintDate: '2026-05-04',
  // other task fields
}
```

## Supported Constraint Types

| Constraint | MSP equivalent | Behavior |
|---|---|---|
| `start-no-earlier-than` | SNET | Start on or after the constraint date. |
| `start-no-later-than` | SNLT | Start on or before the constraint date. |
| `finish-no-earlier-than` | FNET | Finish on or after the constraint date. |
| `finish-no-later-than` | FNLT | Finish on or before the constraint date. |
| `must-start-on` | MSO | Start exactly on the constraint date. |
| `must-finish-on` | MFO | Finish exactly on the constraint date. |

## Soft vs. Hard Constraints

### Soft Constraints (SNET, SNLT, FNET, FNLT)
These constraints define a legal window for the task. If the dependency propagation moves the task outside this window, the scheduler will:
- Adjust the date to the nearest legal bound (if possible).
- Report a `constraint-window-conflict` if the dependency and constraint windows do not overlap.

### Hard Constraints (MSO, MFO)
Hard constraints are authoritative. They pin the task to an exact date, even if it violates dependencies.
- If a dependency requires a different date, the scheduler reports a `hard-constraint-conflict` or `dependency-constraint-conflict`.
- The task date is NOT moved to satisfy the dependency; the constraint wins.

  Microsoft Project also exposes flexible ASAP and ALAP as constraint types. RevoGrid models those at project level with `scheduleFrom`, not as per-task `constraintType` values.
