Share

Open schedule format (OSF)

Open Schedule Format

Open Schedule Format (OSF) is a simple schema for a JSON representation of a schedule data and information model. It is intended for use in interchanging or archiving a schedule model and is therefore a descriptive rather than a prescriptive format. Specifically, it does not specify nor imply how a schedule represented in the format will, or should be, evaluated.

Overview

The OSF schema is defined in a top-level Container as a JSON object. The fundamental schedule data model is described in a Snapshot attached to the snapshot property in the Container. A Snapshot represents a complete schedule data model as a work breakdown structure of activities for one or more projects. The work breakdown structure can include tasks, milestones, and summary activities to represent a hierarchy.

Download a simple schedule in open schedule format to see examples of the JSON syntax described below.

Container

Currently, the only property allowed in the Container is snapshot. However, the schema will be extended in future releases to include other properties.

Elements

Container

object

A Container implements the root object of an Open Schedule Format data model.

Properties

snapshot   Snapshot

The scheduling data model.

Snapshot

object

A Snapshot is a data model for describing a schedule in a structured hierarchy of projects and their activities including dependencies, constraints, calendars, and resources.

Properties

name string

A display name for the snapshot.

description string

A description to annotate the snapshot.

dayDuration integer

The number of working seconds per day to use for durations that are specified in days.

default: 28800 minimum: 1 maximum: 86400

calendar   Calendar

A global calendar for the snapshot.

calendars array of  BaseCalendar

A set of shared calendars that can be referenced by other calendars defined in the snapshot.

resourceClasses array of  ResourceClass

A set of resource classes that can be referenced by tasks as requirements.

projects array of  Project

A set of projects that define the work breakdown structure of the snapshot.

userdata object

Userdata contains arbitrary user data bound to the snapshot.

ResourceClass

object

A ResourceClass defines a resource type that can be referenced in a task's resource requirements.

Properties

id string

A unique identifier for the resource class.

syntax: ^[a-zA-Z0-9][a-zA-Z0-9_\-.]*$

name string

A display name for the resource class.

ResourceContext

object

A ResourceContext defines additional attributes for a resource class.

Properties

resource string

The unique identifier of the resource the context is associated with.

syntax: ^[a-zA-Z0-9][a-zA-Z0-9_\-.]*$

constraints array of  Constraint

A set of constraints to apply to the resource.

Project

object

A Project represents a top level container for a work breakdown structure.

Properties

id string

A unique identifier for the project.

syntax: ^[a-zA-Z0-9][a-zA-Z0-9_\-.]*$

name string

A display name for the project.

priority integer

A relative priority for the project.

default: 0 minimum: -1000 maximum: 1000

start   Date

The earliest start date of all activities contained in the project.

finish   Date

The latest finish date of all activities contained in the project.

calendar   Calendar

A project specific working time calendar.

activities array of  Activity

The set of activities (the work breakdown structure) for the project.

constraints array of  Constraint

A set of constraints to apply to the project.

resources array of  ResourceContext

A set of additional resource-specific attributes for the project.

userdata object

Arbitrary user data bound to the project.

Activity

object

An Activity is a container for an element (a task, milestone or summary) in a project's work breakdown structure.

Properties

id string

A unique identifier for the activity.

syntax: ^[a-zA-Z0-9][a-zA-Z0-9_\-.]*$

name string

A display name for the activity.

priority integer

An optional relative priority.

minimum: -1000 maximum: 1000

milestone ``

summary ``

task ``

start   Date

The date on which the activity is scheduled to begin.

finish   Date

The date on which the activity is scheduled to complete.

dependencies array of  Dependency

The dependency relationships on activities that are predecessors of this activity.

constraints array of  Constraint

The scheduling constraints set on the activity.

calendar   Calendar

An activity-specific working time calendar.

tags array of string

A set of arbitrary tags associated with the activity.

category string

An arbitrary identifier to associate a class or group the activity is a member of.

userdata object

Arbitrary user data bound to the activity.

One of ...

milestone   Milestone

The type of a milestone activity.

summary array of  Activity

The set of activities forming the work breakdown structure of a summary activity.

task   Task

The definition and requirements of a task activity.

Task

object

A Task defines an activity which requires some set of resources for a duration of working time.

Properties

duration   TaskDuration

The amount of working time that the specified resources are required in order to complete the task.

resources array of  ResourceRequirement

The set of resources required for the duration of the task.

TaskDuration

A TaskDuration specifies a duration in either defined or default units.

One of ...

Duration in default units (days)

number

Duration with specified units

string

Syntax

^[0-9]+(\.[0-9]*)?[dhms]$

Examples

6 2.5 "4h" "2.5d" "30m"

ResourceRequirement

object

A ResourceRequirement describes an individual resource requirement for a task.

Properties

resource string

The unique identifier of the resource required.

units number

The quantity of the resource required.

default: 1

Milestone

string

A Milestone is an activity marking an event.

One of

"start" "finish"

Dependency

string

Defines a dependency (precedence relationship) on another activity.

Syntax

^[a-zA-Z0-9][a-zA-Z0-9_\-.]*(:(FS|SS|FF|SF)([+\-]?[0-9]+%*)?)?$

Examples

"Activity1" "Activity2:SS" "Activity3:FS-2" "Activity4:SS+50%"

Constraint

One of ...

As-soon-as-possible

object

Start as soon as possible subject to any predecessor constraints.

Properties

type ASAP

As-late-as-possible

object

Start as late as possible subject to any successor constraints.

Properties

type ALAP

Must-start-on

object

Start on a given date.

Properties

type MSO

date   Date

Start on this date.

Must-finish-on

object

Finish on a given date.

Properties

type MFO

date   Date

Finish on this date.

Start-no-earlier-than

object

Start no earlier than a given date.

Properties

type SNET

date   Date

Start no earlier than this date.

Start-no-later-than

object

Start no later than a given date.

Properties

type SNLT

date   Date

Start no later than this date.

Finish-no-earlier-than

object

Finish no earlier than a given date.

Properties

type FNET

date   Date

Finish no earlier than this date.

Finish-no-later-than

object

Finish no later than a given date.

Properties

type FNLT

date   Date

Finish no later than this date.

Calendar

object

A Calendar defines a day-based working time calendar.

Properties

workweek   CalendarWorkweek

The standard workweek for the calendar.

exceptions array of  CalendarException

A set of date-based exceptions to the standard workweek.

base string

The ID of an optional calendar to base this calendar on. If a base calendar is specified, any entries in this calendar's workweek override the values in the base calendar and any exceptions defined in this calendar override any exceptions from the base calendar with the same date.

CalendarWorkweek

CalendarWorkweek

object

A CalendarWorkweek describes working time in a standard workweek.

Properties

sunday number

Number of working hours for each Sunday.

minimum: 0 maximum: 24

monday number

Number of working hours for each Monday.

minimum: 0 maximum: 24

tuesday number

Number of working hours for each Tuesday.

minimum: 0 maximum: 24

wednesday number

Number of working hours for each Wednesday.

minimum: 0 maximum: 24

thursday number

Number of working hours for each Thursday.

minimum: 0 maximum: 24

friday number

Number of working hours for each Friday.

minimum: 0 maximum: 24

saturday number

Number of working hours for each Saturday.

minimum: 0 maximum: 24

CalendarException

object

A CalendarException defines a date-based exception for a calendar.

Properties

date   Date

The date of the exception.

workday number

The number of hours of available working time for the exception date.

minimum: 0 maximum: 24

description string

An optional description for the exception.

BaseCalendar

object

A BaseCalendar defines a day-based working time calendar which can be referenced by an assigned calendar.

Properties

workweek   CalendarWorkweek

The standard workweek for the calendar.

exceptions array of  CalendarException

A set of date-based exceptions to the standard workweek.

id string

A unique identifier for the calendar.

syntax: ^[a-zA-Z0-9][a-zA-Z0-9_\-.]*$

name string

A display name for the calendar.

Date

string

A Date is represented as an ISO-8601 extended calendar date format string with only dates occurring in year 2000 or later supported.

Syntax

^[2-9][0-9]{3}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$

Examples

"2020-04-01"

JSON Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "#/$defs/Container",
  "$defs": {
    "Activity": {
      "oneOf": [
        {
          "properties": {
            "milestone": {
              "$ref": "#/$defs/Milestone",
              "description": "The type of a milestone activity."
            }
          },
          "required": [
            "milestone"
          ]
        },
        {
          "properties": {
            "summary": {
              "items": {
                "$ref": "#/$defs/Activity"
              },
              "type": "array",
              "description": "The set of activities forming the work breakdown structure of a summary activity."
            }
          },
          "required": [
            "summary"
          ]
        },
        {
          "properties": {
            "task": {
              "$ref": "#/$defs/Task",
              "description": "The definition and requirements of a task activity."
            }
          },
          "required": [
            "task"
          ]
        }
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-.]*$",
          "description": "A unique identifier for the activity."
        },
        "name": {
          "type": "string",
          "description": "A display name for the activity."
        },
        "priority": {
          "type": "integer",
          "maximum": 1000,
          "minimum": -1000,
          "description": "An optional relative priority."
        },
        "milestone": true,
        "summary": true,
        "task": true,
        "start": {
          "$ref": "#/$defs/Date",
          "description": "The date on which the activity is scheduled to begin."
        },
        "finish": {
          "$ref": "#/$defs/Date",
          "description": "The date on which the activity is scheduled to complete."
        },
        "dependencies": {
          "items": {
            "$ref": "#/$defs/Dependency"
          },
          "type": "array",
          "description": "The dependency relationships on activities that are predecessors of this activity."
        },
        "constraints": {
          "items": {
            "$ref": "#/$defs/Constraint"
          },
          "type": "array",
          "description": "The scheduling constraints set on the activity."
        },
        "calendar": {
          "$ref": "#/$defs/Calendar",
          "description": "An activity-specific working time calendar."
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "A set of arbitrary tags associated with the activity."
        },
        "category": {
          "type": "string",
          "description": "An arbitrary identifier to associate a class or group the activity is a member of."
        },
        "userdata": {
          "type": "object",
          "description": "Arbitrary user data bound to the activity."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id"
      ],
      "description": "An Activity is a container for an element (a task, milestone or summary) in a project's work breakdown structure."
    },
    "BaseCalendar": {
      "properties": {
        "workweek": {
          "$ref": "#/$defs/CalendarWorkweek",
          "description": "The standard workweek for the calendar."
        },
        "exceptions": {
          "items": {
            "$ref": "#/$defs/CalendarException"
          },
          "type": "array",
          "description": "A set of date-based exceptions to the standard workweek."
        },
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-.]*$",
          "description": "A unique identifier for the calendar."
        },
        "name": {
          "type": "string",
          "description": "A display name for the calendar."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id"
      ],
      "description": "A BaseCalendar defines a day-based working time calendar which can be referenced by an assigned calendar."
    },
    "Calendar": {
      "properties": {
        "workweek": {
          "$ref": "#/$defs/CalendarWorkweek",
          "description": "The standard workweek for the calendar."
        },
        "exceptions": {
          "items": {
            "$ref": "#/$defs/CalendarException"
          },
          "type": "array",
          "description": "A set of date-based exceptions to the standard workweek."
        },
        "base": {
          "type": "string",
          "description": "The ID of an optional calendar to base this calendar on.\nIf a base calendar is specified, any entries in this calendar's workweek override\nthe values in the base calendar and any exceptions defined in this calendar override\nany exceptions from the base calendar with the same date."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "description": "A Calendar defines a day-based working time calendar."
    },
    "CalendarException": {
      "properties": {
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The date of the exception."
        },
        "workday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "The number of hours of available working time for the exception date."
        },
        "description": {
          "type": "string",
          "description": "An optional description for the exception."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "date",
        "workday"
      ],
      "description": "A CalendarException defines a date-based exception for a calendar."
    },
    "CalendarWorkweek": {
      "properties": {
        "sunday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Sunday."
        },
        "monday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Monday."
        },
        "tuesday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Tuesday."
        },
        "wednesday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Wednesday."
        },
        "thursday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Thursday."
        },
        "friday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Friday."
        },
        "saturday": {
          "type": "number",
          "maximum": 24,
          "minimum": 0,
          "description": "Number of working hours for each Saturday."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "CalendarWorkweek",
      "description": "A CalendarWorkweek describes working time in a standard workweek."
    },
    "Constraint": {
      "oneOf": [
        {
          "properties": {
            "type": {
              "const": "ASAP"
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type"
          ],
          "title": "As-soon-as-possible",
          "description": "Start as soon as possible subject to any predecessor constraints."
        },
        {
          "properties": {
            "type": {
              "const": "ALAP"
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type"
          ],
          "title": "As-late-as-possible",
          "description": "Start as late as possible subject to any successor constraints."
        },
        {
          "properties": {
            "type": {
              "const": "MSO"
            },
            "date": {
              "$ref": "#/$defs/Date",
              "description": "Start on this date."
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type",
            "date"
          ],
          "title": "Must-start-on",
          "description": "Start on a given date."
        },
        {
          "properties": {
            "type": {
              "const": "MFO"
            },
            "date": {
              "$ref": "#/$defs/Date",
              "description": "Finish on this date."
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type",
            "date"
          ],
          "title": "Must-finish-on",
          "description": "Finish on a given date."
        },
        {
          "properties": {
            "type": {
              "const": "SNET"
            },
            "date": {
              "$ref": "#/$defs/Date",
              "description": "Start no earlier than this date."
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type",
            "date"
          ],
          "title": "Start-no-earlier-than",
          "description": "Start no earlier than a given date."
        },
        {
          "properties": {
            "type": {
              "const": "SNLT"
            },
            "date": {
              "$ref": "#/$defs/Date",
              "description": "Start no later than this date."
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type",
            "date"
          ],
          "title": "Start-no-later-than",
          "description": "Start no later than a given date."
        },
        {
          "properties": {
            "type": {
              "const": "FNET"
            },
            "date": {
              "$ref": "#/$defs/Date",
              "description": "Finish no earlier than this date."
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type",
            "date"
          ],
          "title": "Finish-no-earlier-than",
          "description": "Finish no earlier than a given date."
        },
        {
          "properties": {
            "type": {
              "const": "FNLT"
            },
            "date": {
              "$ref": "#/$defs/Date",
              "description": "Finish no later than this date."
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": [
            "type",
            "date"
          ],
          "title": "Finish-no-later-than",
          "description": "Finish no later than a given date."
        }
      ]
    },
    "Container": {
      "properties": {
        "snapshot": {
          "$ref": "#/$defs/Snapshot",
          "description": "The scheduling data model."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "description": "A Container implements the root object of an Open Schedule Format data model."
    },
    "Date": {
      "type": "string",
      "pattern": "^[2-9][0-9]{3}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$",
      "description": "A Date is represented as an ISO-8601 extended calendar date format string with only dates occurring in year 2000 or later supported.",
      "examples": [
        "\"2020-04-01\""
      ]
    },
    "Dependency": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-.]*(:(FS|SS|FF|SF)([+\\-]?[0-9]+%*)?)?$",
      "description": "Defines a dependency (precedence relationship) on another activity.",
      "examples": [
        "\"Activity1\"",
        "\"Activity2:SS\"",
        "\"Activity3:FS-2\"",
        "\"Activity4:SS+50%\""
      ]
    },
    "Milestone": {
      "type": "string",
      "enum": [
        "start",
        "finish"
      ],
      "description": "A Milestone is an activity marking an event."
    },
    "Project": {
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-.]*$",
          "description": "A unique identifier for the project."
        },
        "name": {
          "type": "string",
          "description": "A display name for the project."
        },
        "priority": {
          "type": "integer",
          "maximum": 1000,
          "minimum": -1000,
          "description": "A relative priority for the project.",
          "default": 0
        },
        "start": {
          "$ref": "#/$defs/Date",
          "description": "The earliest start date of all activities contained in the project."
        },
        "finish": {
          "$ref": "#/$defs/Date",
          "description": "The latest finish date of all activities contained in the project."
        },
        "calendar": {
          "$ref": "#/$defs/Calendar",
          "description": "A project specific working time calendar."
        },
        "activities": {
          "items": {
            "$ref": "#/$defs/Activity"
          },
          "type": "array",
          "description": "The set of activities (the work breakdown structure) for the project."
        },
        "constraints": {
          "items": {
            "$ref": "#/$defs/Constraint"
          },
          "type": "array",
          "description": "A set of constraints to apply to the project."
        },
        "resources": {
          "items": {
            "$ref": "#/$defs/ResourceContext"
          },
          "type": "array",
          "description": "A set of additional resource-specific attributes for the project."
        },
        "userdata": {
          "type": "object",
          "description": "Arbitrary user data bound to the project."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id"
      ],
      "description": "A Project represents a top level container for a work breakdown structure."
    },
    "ResourceClass": {
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-.]*$",
          "description": "A unique identifier for the resource class."
        },
        "name": {
          "type": "string",
          "description": "A display name for the resource class."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id"
      ],
      "description": "A ResourceClass defines a resource type that can be referenced in a task's resource requirements."
    },
    "ResourceContext": {
      "properties": {
        "resource": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-.]*$",
          "description": "The unique identifier of the resource the context is associated with."
        },
        "constraints": {
          "items": {
            "$ref": "#/$defs/Constraint"
          },
          "type": "array",
          "description": "A set of constraints to apply to the resource."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "resource"
      ],
      "description": "A ResourceContext defines additional attributes for a resource class."
    },
    "ResourceRequirement": {
      "properties": {
        "resource": {
          "type": "string",
          "description": "The unique identifier of the resource required."
        },
        "units": {
          "type": "number",
          "description": "The quantity of the resource required.",
          "default": 1
        }
      },
      "additionalProperties": false,
      "type": "object",
      "description": "A ResourceRequirement describes an individual resource requirement for a task."
    },
    "Snapshot": {
      "properties": {
        "name": {
          "type": "string",
          "description": "A display name for the snapshot."
        },
        "description": {
          "type": "string",
          "description": "A description to annotate the snapshot."
        },
        "dayDuration": {
          "type": "integer",
          "maximum": 86400,
          "minimum": 1,
          "description": "The number of working seconds per day to use for durations that are specified in days.",
          "default": 28800
        },
        "calendar": {
          "$ref": "#/$defs/Calendar",
          "description": "A global calendar for the snapshot."
        },
        "calendars": {
          "items": {
            "$ref": "#/$defs/BaseCalendar"
          },
          "type": "array",
          "description": "A set of shared calendars that can be referenced by other calendars defined in the snapshot."
        },
        "resourceClasses": {
          "items": {
            "$ref": "#/$defs/ResourceClass"
          },
          "type": "array",
          "description": "A set of resource classes that can be referenced by tasks as requirements."
        },
        "projects": {
          "items": {
            "$ref": "#/$defs/Project"
          },
          "type": "array",
          "description": "A set of projects that define the work breakdown structure of the snapshot."
        },
        "userdata": {
          "type": "object",
          "description": "Userdata contains arbitrary user data bound to the snapshot."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "description": "A Snapshot is a data model for describing a schedule in a structured hierarchy of projects and their activities including dependencies, constraints, calendars, and resources."
    },
    "Task": {
      "properties": {
        "duration": {
          "$ref": "#/$defs/TaskDuration",
          "description": "The amount of working time that the specified resources are\nrequired in order to complete the task."
        },
        "resources": {
          "items": {
            "$ref": "#/$defs/ResourceRequirement"
          },
          "type": "array",
          "description": "The set of resources required for the duration of the task."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "description": "A Task defines an activity which requires some set of resources for a duration of working time."
    },
    "TaskDuration": {
      "oneOf": [
        {
          "type": "number",
          "title": "Duration in default units (days)"
        },
        {
          "type": "string",
          "pattern": "^[0-9]+(\\.[0-9]*)?[dhms]$",
          "title": "Duration with specified units"
        }
      ],
      "description": "A TaskDuration specifies a duration in either defined or default units.",
      "examples": [
        6,
        2.5,
        "\"4h\"",
        "\"2.5d\"",
        "\"30m\""
      ]
    }
  }
}

Was this information helpful?