{"modulePath":"github.com/LeanerCloud/cloud-commitments-platform","version":"v0.0.0-20261202160902-a99bcb5bfea3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package schedexpr\n\nPackage schedexpr parses the schedule expressions the deployment's scheduler uses to trigger recommendation collection and works out when the next run fires (issue #756).\n\nThree syntaxes are accepted, matching what the Terraform modules hand to their schedulers:\n\n  - EventBridge rate expressions, e.g. \"rate(1 day)\" (AWS Lambda/Fargate);\n  - EventBridge cron expressions with six fields, e.g. \"cron(0 2 \\* \\* ? \\*)\" (AWS Lambda/Fargate);\n  - standard five-field cron, e.g. \"0 2 \\* \\* \\*\" (GCP Cloud Scheduler, Kubernetes CronJobs, the Azure Logic App recurrence).\n\nEvery scheduler involved evaluates its schedule in UTC, so Next works in UTC. The parser is deliberately strict: anything it does not fully understand is an error, and callers report \"unknown\" instead of a wrong time.\n\n## Variables\n\n```go\nvar ErrEmpty = errors.New(\"empty schedule expression\")\n```\nErrEmpty is returned by Parse for an empty or blank expression, which the deployment uses to mean \"scheduled collection is disabled\".\n\n## Types\n\n```go\ntype Schedule interface {\n\t// Next returns the first fire time strictly after t, in UTC. ok is\n\t// false when the fire time cannot be known from the expression alone\n\t// (rate expressions) or no fire time exists within the search horizon.\n\tNext(t time.Time) (next time.Time, ok bool)\n}\n```\nSchedule is a parsed schedule expression.\n\n```go\nfunc Parse(expr string) (Schedule, error)\n```\nParse parses expr in any of the supported syntaxes.\n\n","path":"github.com/LeanerCloud/cloud-commitments-platform/internal/schedexpr","name":"schedexpr","synopsis":"Package schedexpr parses the schedule expressions the deployment's scheduler uses to trigger recommendation collection and works out when the next run fires (issue #756).","isRedistributable":true}
