FleetDeckDocs

CLI command

fleetdeck schedule

Create one future agent job.

Usage

bash
fleetdeck schedule JSON
Example
fleetdeck schedule '{"deviceId":"device_123","name":"Observe","prompt":"Capture and describe the screen.","scheduledAt":"2030-01-01T11:00:00+01:00","timezone":"Europe/Bratislava"}'

Arguments

ArgumentRequiredDescription
JSONrequiredJob object with deviceId, name, prompt, scheduledAt and timezone. Quote it as one argument.

Supply FLEETDECK_API_KEY through the environment. See environment configuration.

deviceIdstringrequired

Exact device ID from List devices. The current key must grant access to this phone.

min 1 charactersmax 128 characters
Validation pattern^[A-Za-z0-9._:-]+$
namestringrequired

Name of the resource or operation. For commands with an enum, choose one of the listed values.

min 1 charactersmax 120 characters
promptstringrequired

Task instructions passed to the external agent adapter. A worker must be running to execute them.

min 1 charactersmax 16,000 characters
scheduledAtstringrequired

Future instant with UTC offset, strictly before key expiry when set. No-expiry keys have no key-expiry cutoff; jobs still use finite leases and deadlines. Example dates must be replaced with your actual future schedule.

date-time
timezonestringrequired

Valid IANA timezone. Metadata only; scheduledAt is the actual execution instant.

min 1 charactersmax 100 characters
deadlineSecondsintegeroptional

Maximum job runtime in seconds; the worker stops the child at the finite deadline.

min 60max 3,600default 900

Unknown fields are rejected.

Behavior

  • JSON follows JobInput and must include an explicit UTC offset plus an IANA timezone.
  • A continuously running worker using the same parent key must claim the job within 30 seconds of scheduledAt.

Output and exit

Writes formatted JSON to stdout. Errors are one JSON object on stderr.

Example stdout
{
  "id": "job_123",
  "deviceId": "device_123",
  "name": "Inspect phone",
  "scheduledAt": "2030-01-01T10:00:00.000Z",
  "timezone": "Europe/Bratislava",
  "status": "queued",
  "startedAt": null,
  "finishedAt": null,
  "cancelRequested": false,
  "summary": null
}

Response fields and API errors: Schedule one agent task.

See all exit codes and error recovery.