Station Object

A Station is one job on a line: a factory session runs it with the one handler its factory defines for the station's code, passing it the station's config. Stations are triggered by hand, by the API, by a factory's bin watcher, or on a schedule.

Object Structure

{
  "id": "Lk2mP9qRs3Tu",
  "short_code": "EX1",
  "line": "EX",
  "name": "count_words",
  "description": "Count the words in each workpiece's document",
  "conveyor": { "from": "EX0/output" },
  "config": {},
  "dependencies": ["EX0"],
  "is_enabled": true,
  "watch_enabled": true,
  "schedule_cron": null,
  "schedule_timezone": "UTC",
  "schedule_enabled": false,
  "created_at": "2026-10-19T08:00:00Z"
}

Fields

FieldTypeRequiredDescription
idstringAuto12-character unique identifier
short_codestringYesThe station's code within the org, such as IN1; names its handler (src/stations/<CODE>__<name>/station.js in the factory), its bins and the API
linestringYesCode of the line the station belongs to. The line owns the location its stations run at
namestringYesStation name
descriptionstringNoHuman-readable description
conveyorobject | nullNoThe bins the station takes work from: { "from": "EX0/output" }, or a list ({ "from": ["JB0a/output", "JB0b/output"] }). Each bin is <CODE>/output, optionally with a sub-bin (EM1/output/transaction). The factory session moves each finished workpiece from these bins into the station's input. null for a line-head. Stored, not read, by the Orchestrator
configobjectNoOne JSON object passed to the station's handler (default: {}). See Config
dependenciesarrayNoStation IDs that must complete first
is_enabledbooleanNoWhether station can be executed (default: true)
schedule_cronstringNoCron expression for automatic execution (5-field: min hour day month weekday). null = manual only
schedule_timezonestringNoIANA timezone for cron interpretation (default: "UTC"). Example: "Asia/Kolkata", "America/New_York"
schedule_enabledbooleanNoWhether the schedule is active (default: false). Requires schedule_cron to be set
watch_enabledbooleanNoWhether the factory session starts the station when work arrives (bin-watch or intake watch; default: false). Read by the factory, not by the Orchestrator
next_run_atstringAutoISO 8601 timestamp of next scheduled execution
last_run_atstringAutoISO 8601 timestamp of last scheduled execution
created_atstringAutoISO 8601 timestamp

Config

A station runs one handler, defined in your factory repo with defineStation() from @assemblyline/lib-factory in src/stations/<CODE>__<name>/station.js. Its code is the station's short_code. The handler gets the station's config, validated by its configSchema. Moving work in from the station before is not part of the handler: that's the station's conveyor.

{
  "short_code": "EX0",
  "config": { "source_dir": "samples" }
}

A line-head watched for raw input names its intake folder in config.watch_path.

A write that still sends steps is refused with a 400: a station has one config.

Station Dependencies

The dependencies array lists the upstream stations (ids or short codes) this station takes work from:

{
  "short_code": "EX1",
  "dependencies": ["EX0"]
}

It draws the line's graph in the UI. Workpieces move between stations through bins, so the orchestrator doesn't enforce the order.

Scheduling

Stations can be executed automatically on a schedule. Set schedule_cron, schedule_timezone, and schedule_enabled:

{
  "name": "Daily Freshness Report",
  "schedule_cron": "30 2 * * *",
  "schedule_timezone": "UTC",
  "schedule_enabled": true
}

The scheduler checks every minute and queues execution when due. Overlap protection: if a previous run is still pending or running, the scheduled run is skipped.

See Start stations on assemblyline.sh for schedules, bin-watch and intake watch.

Config of a run

When a run is queued, the station's config, with the run's config_overrides merged over it, is frozen on the work record (config_snapshot) and sent to the factory session as it is: {{…}} is not filled in. Editing the station doesn't change a run already queued.

Credentials and other secrets never go in a station's config. A handler reads them from its factory's environment: see Credentials and secrets on assemblyline.sh.

See Also