Skip to content

[🐛 Bug]: workflow trigger interval work just with int #3003

@00041275

Description

@00041275

syntax trigger for interval must be in 5m or cron, but we just can set int value.

docs/workflows/syntax/triggers.mdx

Interval Trigger

Runs workflows at a regular time interval or using a CRON expression.

triggers:
  - type: interval
    # Run every 5 minutes
    value: 5m
triggers:
  - type: interval
    # Run daily at 11:00 AM and 2:00 PM
    cron: "0 11,14 * * *"

keep/parser/parser.py

    def parse_interval(self, workflow) -> int:
        # backward compatibility
        workflow_interval = workflow.get("interval", 0)
        triggers = workflow.get("triggers", [])
        for trigger in triggers:
            if trigger.get("type") == "interval":
                workflow_interval = trigger.get("value", 0)
        return workflow_interval

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions