Scheduler
The scheduler lets you automate MZAP operations on a time-based trigger system.
Trigger Types
Section titled “Trigger Types”- Once — Run at a specific date and time
- Daily — Run every day at a set time
- Weekly — Run on specific days of the week
- Interval — Run every N minutes/hours
- Cron — Full cron expression for complex schedules
- Prayer Time — Run daily at one of the five Islamic prayer times, computed from the venue's location (see below)
- Air alert (UkraineAlarm) — Run when an official Ukrainian air-raid alert starts or ends in the regions you pick (see below)
Daily and Weekly start times
Section titled “Daily and Weekly start times”For Daily and Weekly triggers, the task's start time is an activation date, not the exact firing instant. If you create a Daily task at 15:56:00 with trigger time 15:56, it fires today at 15:56 (in the task's timezone) — not tomorrow. A future start date still gates the trigger: a Daily task with a start date in the future won't fire until that date arrives.
Seconds are honoured
Section titled “Seconds are honoured”Daily and Weekly tasks fire at the second you set. A task set for 21:32:39 fires at 21:32:39, where it previously rounded down to 21:32:00.
- The Trigger column shows seconds only when they are non-zero —
Daily 21:32versusDaily 21:32:39. - Next Run, Last Run, and the Execution Log all display seconds.
- Existing tasks keep working. Tasks saved before this change continue to fire at
:00; re-saving one adopts the seconds from its Start Time.
Action Types
Section titled “Action Types”Scheduled tasks can perform these actions:
- PlayerControl — Play, pause, stop, or adjust player volume
- ZoneControl — Adjust zone volume or mute state
- LoadWorkspace — Load a saved workspace
- JinglePlay — Play a jingle
- RoutingControl — Attach or detach player-zone connections
Prayer Time triggers
Section titled “Prayer Time triggers”Prayer Time triggers fire daily at one of the five Islamic prayer times — Fajr, Dhuhr, Asr, Maghrib, Isha — or at Sunrise, which is also offered as a reference time. Times are recomputed from astronomical formulas every day for the venue's latitude and longitude, so there is no hardcoded schedule to maintain. This is intended for malls, hotels, and venues in MENA markets that need automatic adhan playback or music suppression at prayer time.
Configure venue location first
Section titled “Configure venue location first”Before you can pick a Prayer Time trigger, set the venue location and calculation method in Settings → Prayer-Time Scheduling. See the Prayer-Time Scheduling settings for the full reference.
Create a Prayer Time trigger
Section titled “Create a Prayer Time trigger”- Open Scheduler and create a new task.
- Set Trigger Type to Prayer Time.
- Pick the prayer (Fajr, Sunrise, Dhuhr, Asr, Maghrib, or Isha).
- Set an Offset (minutes) — negative runs the task that many minutes before the prayer, positive runs it after,
0runs at the prayer time exactly. Useful for warning chimes (e.g.-5for "five minutes before Maghrib") or post-adhan resume cues. - Pair with any action: JinglePlay to play the adhan, PlayerControl to pause music, ZoneVolume to drop a zone, etc.
The next run time is recomputed automatically each day from the current day's prayer times — no manual updating required.
Date-bounded triggers (e.g. Ramadan only)
Section titled “Date-bounded triggers (e.g. Ramadan only)”When the trigger type is Prayer Time, the Start time and End time fields become Active from and Active until date pickers. Leave them empty to run year-round, or set them to limit the trigger to a date range — for example, set Active from to the first day of Ramadan and Active until to the last day so the trigger only fires that month.
"Music stops, prayer plays, music returns"
Section titled “"Music stops, prayer plays, music returns"”For the common workflow where music ducks completely while the adhan plays and then returns:
- Create a jingle for the adhan and set its Duck Level to
0%— this fully silences the underlying music while the jingle plays, then restores it. - Schedule a Prayer Time trigger with a JinglePlay action that plays the adhan jingle.
For internet streams, the stream keeps decoding silently underneath the duck so playback resumes instantly with no reconnect lag.
Air alert triggers
Section titled “Air alert triggers”Air alert triggers react to official Ukrainian air-raid alerts from the UkraineAlarm service. For example, a task can stop the music and play an announcement when an air alert starts in your community, and another task can resume the music when the all clear comes.
Before you start
Section titled “Before you start”- License feature. Air-raid alerts are a license feature. They are not part of the trial or of standard licenses; ask us to enable them for your license. Without the feature, the Air alert trigger type and the settings section are hidden, and no air alert task runs. An existing air alert task stays in the list and can still be edited or deleted; its editor says it does not run.
- Your own API key. Each customer needs their own UkraineAlarm API key; MZAP does not include one. Request it from UkraineAlarm, then save it in Settings → Automation → Air-raid alerts (UkraineAlarm). See Air-raid alerts settings.
Create an air alert task
Section titled “Create an air alert task”- Open Scheduler and create a new task.
- Set Trigger Type to Air alert (UkraineAlarm).
- Under Regions, pick an oblast or city. Optionally narrow it down to a district or community, or search by name. Add at least one region.
- Under Alert types, tick the alerts that count: Air raid (the default), Artillery shelling, Urban fighting, Chemical threat, Radiation threat, Information message.
- Under Fires when, choose Level becomes red, Level becomes yellow, Any alert starts or All clear.
- Optionally set a Delay (seconds), from
0to3600. - Optionally set Active from and Active until. Outside this window the task never reacts. With no Active until, the task reacts indefinitely.
- Pick the action, for example JinglePlay for an announcement or PlayerControl to stop the music.
Repeat count is hidden for this trigger, and air alert tasks are never disabled automatically after they run.
Region names are shown as UkraineAlarm lists them, in Ukrainian (for example м. Київ or Київська область). The task list shows the trigger as, for example, Air alert: м. Київ (+2) · Air raid · becomes red.
Which alerts count
Section titled “Which alerts count”- A picked region reacts to alerts declared for the region itself, and for the district and oblast that contain it.
- By default it does not react to alerts declared only for a district or community inside it. Picking an oblast does not cover an alert raised only for one of its districts.
- To count those too, tick Also react to alerts in districts and communities inside these regions under the region picker. The task list then shows + districts for the task.
- Kharkiv and Zaporizhzhia cities are top-level regions. Add their oblast too if oblast alerts should count.
- The task's level is the highest across all its regions: red outweighs yellow.
Running several tasks in order
Section titled “Running several tasks in order”Tasks fired by the same alert change run in order of their delay, then by task name. Use this to build a sequence: an announcement at 0 seconds, the music stops at 5 seconds, and so on.
A delayed run is skipped if, when it is due:
- the alert no longer matches (for example, the all clear came during the delay), or
- the task was disabled, deleted or edited, or its active window closed.
While a delayed run is waiting, the task does not start a second run; the first run wins.
When MZAP checks for alerts
Section titled “When MZAP checks for alerts”MZAP checks UkraineAlarm only while an API key is saved and at least one enabled air alert task has its active window open. Otherwise it sends no requests at all. Alerts are detected within about a minute.
- At startup, if an alert is already active, matching Level becomes red, Level becomes yellow and Any alert starts tasks run at the first check. If there is no alert, nothing runs: "no alert" is the normal state, so All clear tasks do not run at startup.
- Creating, re-enabling or editing a task's alert settings (regions, types, Fires when, delay) checks it at once against the current alerts. If a matching alert is active, the task runs.
- Alerts that started and ended while MZAP was off are not replayed. If an alert ends while MZAP is off, the All clear task does not run when MZAP starts again.
- A short network outage does not re-run tasks. After it, only tasks whose alert level really changed fire.
- While UkraineAlarm cannot be reached, no new runs start. A delayed run that was already waiting still runs.
The log has a line for each task whenever its alert level changes, whether the task runs or not, with the alerts behind the level. For example: [UkraineAlarm] Task 'Siren' (…) level None -> Red (Red): fires, runs in 0 s; alerts: Бориспільський район (78) AIR Red.
The air alert screens are translated into English and Ukrainian only for now.
Managing Tasks
Section titled “Managing Tasks”Editing a task
Section titled “Editing a task”The task editor offers two ways to save:
- Save writes the task in place and shows a brief "Saved" indicator, so you can keep tweaking the same task.
- Save & close saves the task and returns you to the task list in one click.
When editing an existing task, the Cancel button is relabeled Back to tasks — pressing it returns to the list (your changes were already committed by Save).
To remove a task's end time, clear its End Time (or Active until) field and save. Before 7.3.0.145 this change was silently ignored and the old end time stayed.
The task list
Section titled “The task list”The Trigger column shrinks to fit, so the Trigger Now, Duplicate and Delete buttons always stay visible. Long triggers are cut with "…"; hover the trigger to see the full text. Air alert triggers list up to two alert types by name, otherwise a count ("4 types"), or "all types" when every type is selected.
Duplicating a task
Section titled “Duplicating a task”Click the copy icon in a task row's action column (between the trigger and delete buttons) to clone that task. The clone copies every field — trigger, action, parameters, targets, schedule, and repeat count — and is created disabled with a "(copy)" suffix on its name. Review the clone and enable it when you're ready.
Who can manage tasks
Section titled “Who can manage tasks”Creating, editing, enabling, disabling, duplicating, deleting, and manually running (Trigger now) tasks requires the Operator role or higher. Viewers can see the task list, the scheduler status, and the execution log, but cannot change or run anything — the edit and trigger controls are hidden for them. See Roles and permissions.
Execution Logging
Section titled “Execution Logging”All task executions are logged with timestamps and results for auditing and troubleshooting.