(context: unknown, onComplete?: unknown)
| 93 | const cronString = replaceCronNames(cronTime); |
| 94 | |
| 95 | async function monitoredTick(context: unknown, onComplete?: unknown): Promise<void> { |
| 96 | return withMonitor( |
| 97 | monitorSlug, |
| 98 | async () => { |
| 99 | try { |
| 100 | await onTick(context, onComplete); |
| 101 | } catch (e) { |
| 102 | captureException(e, { |
| 103 | mechanism: { |
| 104 | handled: false, |
| 105 | type: 'auto.function.cron.instrumentCron', |
| 106 | }, |
| 107 | }); |
| 108 | throw e; |
| 109 | } |
| 110 | }, |
| 111 | { |
| 112 | schedule: { type: 'crontab', value: cronString }, |
| 113 | timezone: timeZone || undefined, |
| 114 | }, |
| 115 | ); |
| 116 | } |
| 117 | |
| 118 | return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest); |
| 119 | }, |
nothing calls this directly
no test coverage detected