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

Data

Description

flow

the name of the flow to run

Required

action

can be used to start the flow at a different state. See routing.

Optional

data

data needed for the specified flow

Use if you need to pass data to the sub-flow

tag

a unique identifier for your schedule. Used to stop schedules.

  • Optional* - however, recommended, and required to programmatically stop schedules

cron

"* * * * *"

Use this or period

timezone

the timezone used for cron jobs

Optional. Default:UTC

timezone_scope

use if your datastore already contains the timezone to run your cron job

Ignored if timezone is set.

period

one of [seconds, minutes, hours, weeks, months or years]

Use this or cron

interval

how often to run.

Optional. Default:1

max_count

the maximum number of loops

Optional. Default:100

base

base time to calculate the first run

Optional. 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.

Property

Description

flow

the name of the flow to start.

Required

action

the action to trigger

  • Optional* default start

data

a dictionary of data to pass to flow scope

  • Optional* default null

text

Text to display to the user

Optional

meya.schedule_stop

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

Property

Description

tag

the unique identifier of the schedule to stop

Required

component: meya.schedule_stop
properties:
	tag: affirmation