ShtukbaseStandard
collection/automations.md

Automations

What happens by itself: an event, an action in response and a limit on how many times per hour and per day.

Page fields (6)
icon⏰
itemTypeAutomation
items{mode: path,path: /automations,recursive: false}
writeTo/automations
properties{trigger: {kind: text,label: When (event)},reaction: {kind: text,label: What it does},limits: {kind: text,label: Limits},mode: {kind: select,label: Mode,options: [{name: manual,label: By hand,color: gray},{name: auto,label: By itself,color: green}]},node: {kind: text,label: Where it runs (machine)}}
views[{id: automations--table,name: All automations,layout: table,fields: {},sorting: [{propertyId: title,direction: ascending}],properties: [{name: title,visible: true,width: 320},{name: trigger,visible: true},{name: mode,visible: true},{name: node,visible: true}]}]

An automation is an event and a reaction to it: when trigger fires, reaction runs. It is not a norm: a norm says what must be there, and an automation is one way to get there after an event.

trigger: {kind: clock, at: "03:00"}             # or every: 15m, cron: "0 3 * * *"
reaction: {action: /actions/nightly-check}      # or {agent: /agents/worker}
limits: {perHour: 1, perDay: 1}
mode: manual                                     # auto: the executor runs it

Kinds of event (trigger.kind):

KindWhat else to give
clock (or schedule)at, every or cron
changewithin: the folder to watch for changes
phasecontour and phase: a record entered the phase
sensorsensor: the sensor page
run-finishedautomation: whose run ended
manual (or hand)nothing: a person runs it
answernothing: a person's answer to a run question

mode: manual is an instruction for a person or an agent: the executor does not run it by itself. mode: auto is run by the executor (for example the Shtukbase node) by itself, but no more often than the limits limits allow.

Norm ACT-R02 makes sure an automation says when, what and how many times.

The package Actions and automations puts this page at /automations.md.Source text