parse • AI Agents Framework
parse: Parse schedule expression and return interval in seconds.
parse
Method
</div>
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) -> intParameters
ParamField
strSchedule expression string
Returns
ResponseField
intInterval in seconds
Exceptions
ValueError
If schedule format is not supported
Uses
schedule_expr.isdigitValueError
Used By
Source
View on GitHubpraisonai/agent_scheduler.py at line 36