#[trigger]Expand description
Define a trigger that fires a workflow on a schedule or condition.
§Custom poll trigger
ⓘ
#[trigger(on = "my_workflow", poll_interval = "5s")]
pub async fn check_inbox() -> Result<TriggerResult, TriggerError> {
// check condition, return Fire(ctx) or Skip
}§Cron trigger (T-0305)
ⓘ
#[trigger(on = "my_workflow", cron = "0 2 * * *", timezone = "UTC")]