---
name: parse_cron_expr
kind: function
lang: py
domain: core
version: "1.0.0"
purity: pure
signature: "parse_cron_expr(expr: str) -> dict"
description: "Parsea una expresion cron estandar de 5 campos. Soporta *, rangos (1-5), listas (1,3,5), pasos (*/15) y aliases (@hourly, @daily, @weekly, @monthly, @yearly). Retorna dict con claves minute, hour, day_of_month, month, day_of_week con listas de enteros validos."
tags: [cron, scheduling, parsing, time, pure]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
params:
  - name: expr
    desc: "Expresión cron estándar de 5 campos o alias como @daily, @hourly"
output: "Diccionario con claves minute, hour, day_of_month, month, day_of_week conteniendo listas de enteros válidos"
tested: true
tests:
  - "*/15 expande minutos a [0 15 30 45]"
  - "@daily resuelve a minuto 0 hora 0"
  - "0 9 1,15 * * expande dias a [1 15]"
  - "0 9 * * 1-5 expande dia de semana a [1 2 3 4 5]"
  - "expresion con 4 campos lanza ValueError"
  - "minuto fuera de rango lanza ValueError"
test_file_path: "python/functions/core/parse_cron_expr_test.py"
file_path: "python/functions/core/parse_cron_expr.py"
---

## Ejemplo

```python
from parse_cron_expr import parse_cron_expr

sched = parse_cron_expr("*/15 * * * *")
# sched["minute"] = [0, 15, 30, 45]
# sched["hour"]   = list(range(24))

sched2 = parse_cron_expr("@daily")
# sched2["minute"] = [0]
# sched2["hour"]   = [0]

sched3 = parse_cron_expr("0 9 * * 1-5")
# sched3["day_of_week"] = [1, 2, 3, 4, 5]
```

## Notas

Misma semantica que la version Go (parse_cron_expr_go_core). Usa dict en lugar de struct. Limites de campos: minute [0,59], hour [0,23], day_of_month [1,31], month [1,12], day_of_week [0,6] (0=domingo). Lanza ValueError con mensaje descriptivo para entradas invalidas.
