Schedule components

These are components that deal with timing, scheduling and delays. To see the complete spec, see the Overview section.

meya.schedule

meya.schedule runs flows either at set intervals or at specific times. The parameters can be set either using cron syntax (https://en.wikipedia.org/wiki/Cron) or periodically.

📘

meya.schedule is actually a built-in flow, not a component, so note the difference in syntax.

Scheduled flows expire after 100 iterations or max_count iterations, whichever is lower.

states:
    start_schedule:
        flow: meya.schedule
        data:
            tag: facts
            flow: random_fact
            period: seconds
            interval: 10
            max_count: 5
DataDescription
flowthe name of the flow to runRequired
actioncan be used to start the flow at a different state. See routing.Optional
datadata needed for the specified flowUse if you need to pass data to the sub-flow
taga unique identifier for your schedule. Used to stop schedules.Optional - however, recommended, and required to programmatically stop schedules
cron"* * * * *"Use this or period
timezonethe timezone used for cron jobsOptional. Default: UTC
timezone_scopeuse if your datastore already contains the timezone to run your cron jobIgnored if timezone is set.
periodone of [seconds, minutes, hours, weeks, months or years]Use this or cron
intervalhow often to run.Optional. Default: 1
max_countthe maximum number of loopsOptional. Default: 100
basebase time to calculate the first runOptional. Default: now

meya.start_flow

meya.start_flow allows you to asynchronously start another flow and immediately advance to the next state without blocking forward progress.

PropertyDescription
flowthe name of the flow to start.Required
actionthe action to triggerOptional default start
dataa dictionary of data to pass to flow scopeOptional default null
textText to display to the userOptional

meya.schedule_stop

meya.schedule_stop allows you to stop an existing running scheduled flows by specifying their tag name.

PropertyDescription
tagthe unique identifier of the schedule to stopRequired
component: meya.schedule_stop
properties:
	tag: affirmation