Create a scheduled automation
A scheduled automation is a module that runs on a timer — cron or interval — with no manual button. Use it for periodic server actions (timed broadcasts, map rotation), or to run over every online player on a schedule.
-
In Automations, click New automation; the editor opens with an empty module. Set the header
nameto something descriptive. -
In the header
trigger, writekind: 'schedule'and exactly one of two timers:every— runs repeatedly, spaced by the given duration. Write values like30m,2h,45s, or1d.cron— runs at fixed UTC clock times. Write a cron expression such as0 */6 * * *; a sixth field for seconds in front and shortcuts such as@dailyare accepted too. What heliana accepts in cron mode is in the Cron syntax reference.
An automation never runs more often than once every 30 seconds, in either mode.
An expression heliana can’t parse, or one that never runs, is refused at save time with a message naming the field: Cron expression is invalid or never runs for
cron, Must be a duration: a positive number followed by d, h, m or s forevery. -
In the same
trigger, setforto choose who the automation acts on each time it fires:'server'— runs once for the whole server.- Each online player (
'player') — runs once for every player currently online. Fields{player.name},{player.eosID},{player.steamID},{player.squad},{player.role},{player.party},{player.vehicle},{player.isSquadLeader}(the text true or false),{player.team}and{player.squadIndex}, each read asctx.player.<field>in the module. Decide with anifwhether the actions run for that player; with no condition it runs for every online player.
-
Write
run(ctx)and act withctx.rcon,ctx.ban,ctx.noteorctx.fetch. See Automation SDK reference. -
Press Test run, then click Save. A new automation is Enabled and runs from the next tick; switch it to Disabled first to save it off.
-
Under the editor, Servers says where the automation runs. It starts on All servers, and clearing the field returns it to All servers; to stop it everywhere, switch it to Disabled. See Create an event automation.
import { defineAutomation } from '@heliana/automation'
export default defineAutomation({ game: 'squad', name: 'Rules reminder', async run(ctx) { await ctx.rcon('AdminBroadcast Be kind to your teammates.') }, trigger: { every: '30m', for: 'server', kind: 'schedule' },})A new organization has no scheduled automations: write your own or start from the examples.