Files
homarr/packages/cron-job-runner/src/register.ts
2025-05-23 22:20:47 +02:00

13 lines
317 B
TypeScript

import { jobGroup } from "@homarr/cron-jobs";
import { cronJobRunnerChannel } from ".";
/**
* Registers the cron job runner to listen to the Redis PubSub channel.
*/
export const registerCronJobRunner = () => {
cronJobRunnerChannel.subscribe((jobName) => {
void jobGroup.runManuallyAsync(jobName);
});
};