Scheduling and recurrence
A DroneMission can dispatch itself: once, at a future moment, or on a recurrence. The
scheduler runs against the scheduledAt and recurrence fields and walks the mission
through the same upload → register → prepare pipeline a manual dispatch uses.
One-shot (scheduledAt)
In the planner’s Schedule section pick Once and set a date/time. The mission
document gets scheduledAt (epoch ms) and status: 'scheduled'. At the scheduled
moment:
- The scheduler calls
DjiMissionDispatcherService.dispatchToDockwithscheduledTime = scheduledAt, which is passed through to the DJI flight task. - Mission status progresses
scheduled→dji_dispatched→wayline_uploading→wayline_registered→dji_preparing→dji_ready→dji_executing→dji_completed. - Weather gates and dock-availability checks run just before dispatch. A hard fail
after the configured retry budget sets status to
weather_holdorschedule_cancelled.
Recurring (recurrence)
Pick Recurring to build a DroneMissionRecurrence:
freq—daily,weekly, ormonthly.timeOfDay—HH:mmstring, 24-hour, local timezone.daysOfWeek— forweekly: array of 0-6 (Sun..Sat). Ignored otherwise.dayOfMonth— formonthly: 1-31. Ignored otherwise.endsAt— optional epoch ms. Unset = indefinite.enabled— toggle without deleting the rule.
Each occurrence spawns a fresh mission instance cloned from the original, so you
retain a browsable history of every flight. The original recurrence-template mission
tracks lastDispatchedAt and nextDispatchAt as the scheduler advances.
Status flow for a recurring mission:
scheduled— armed, awaitingnextDispatchAt.schedule_paused— pause via the planner without losing the rule.schedule_completed—endsAtreached.schedule_cancelled— user-cancelled.
Auto-cancel on dependency failure
If a prerequisite fails at dispatch time — dock offline, aircraft not docked, wayline
registration refused, weather gate red after retries — the occurrence transitions to
dji_failed and the next occurrence is queued as normal. The parent recurrence is not
killed; use Pause schedule in the planner to stop that.
Weather holds
Weather checks run inside the pre-dispatch phase. A weather_hold status means the
scheduler is retrying on a backoff and the mission will dispatch as soon as conditions
clear, up to the retry ceiling; after that it fails the occurrence and moves on.
Editing
Scheduled and recurring missions are fully editable until the next occurrence starts.
Changing scheduledAt or the recurrence rule reschedules the next run.
Viewing upcoming runs
- The operation’s mission list shows the next-run timestamp for every recurring plan.
- The ops-map tile plots the next wayline preview when the mission is selected.