//#region src/cli/commands/cron-cli.ts
async function withCronService(fn) {
	const { CronService } = await import("../../cron/index.js");
	const cronService = new CronService();
	await cronService.initialize();
	try {
		return await fn(cronService);
	} finally {
		await cronService.stop();
	}
}
//#endregion
export { withCronService };

//# sourceMappingURL=cron-cli.js.map