> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# parse • AI Agents Framework

> parse: Parse schedule expression and return interval in seconds.

# parse

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ScheduleParser**](../classes/ScheduleParser) class in the [**agent\_scheduler**](../modules/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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def parse(schedule_expr: str) -> int
```

## Parameters

<ParamField query="schedule_expr" type="str" required={true}>
  Schedule expression string
</ParamField>

### Returns

<ResponseField name="Returns" type="int">
  Interval in seconds
</ResponseField>

### Exceptions

<AccordionGroup>
  <Accordion title="ValueError">
    If schedule format is not supported
  </Accordion>
</AccordionGroup>

## Uses

* `schedule_expr.isdigit`
* `ValueError`

## Used By

* [`AgentScheduler.start`](../functions/AgentScheduler-start)
* [`DeploymentScheduler.start`](../functions/DeploymentScheduler-start)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/agent_scheduler.py#L36">
  `praisonai/agent_scheduler.py` at line 36
</Card>
