(cron: string | undefined | null)
| 1 | import type { ScheduledJobConfig } from "./job-config.js"; |
| 2 | |
| 3 | export function normalizeJobCron(cron: string | undefined | null): string | undefined { |
| 4 | if (typeof cron !== "string") { |
| 5 | return undefined; |
| 6 | } |
| 7 | |
| 8 | const normalized = cron.trim(); |
| 9 | return normalized ? normalized : undefined; |
| 10 | } |
| 11 | |
| 12 | export function hasJobSchedule( |
| 13 | jobOrCron: Pick<ScheduledJobConfig, "cron"> | string | undefined | null, |
no outgoing calls
no test coverage detected