47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cron_match | function | go | core | 1.0.0 | pure | func CronMatch(sched CronSchedule, t time.Time) bool | Verifica si un instante de tiempo coincide con un cron schedule. Compara los 5 campos (minuto, hora, dia del mes, mes, dia de la semana) y retorna true si todos coinciden. |
|
|
false |
|
|
true si t coincide con todos los campos del cron schedule | true |
|
functions/core/cron_match_test.go | functions/core/cron_match.go |
Ejemplo
sched, _ := ParseCronExpr("0 9 * * *")
t := time.Date(2026, 4, 11, 9, 0, 0, 0, time.UTC)
CronMatch(sched, t) // true
t2 := time.Date(2026, 4, 11, 10, 0, 0, 0, time.UTC)
CronMatch(sched, t2) // false
Notas
Funcion pura. Usa AND semantics para day_of_month y day_of_week (ambos deben coincidir), igual que NextCronTime en el mismo paquete. Reutiliza el helper intIn definido en next_cron_time.go (mismo paquete core).