Skip to main content

parse

Method
This is a method of the ScheduleParser class in the agent_scheduler module.
Parse schedule expression and return interval in seconds. Supported formats:
  • “daily” -> 86400 seconds
  • “hourly” -> 3600 seconds
  • ”*/30m” -> 1800 seconds (every 30 minutes)
  • ”*/1h” -> 3600 seconds (every 1 hour)
  • “60” -> 60 seconds (plain number)

Signature

def parse(schedule_expr: str) -> int

Parameters

schedule_expr
str
required
Schedule expression string

Returns

Returns
int
Interval in seconds

Exceptions

If schedule format is not supported