avocadi-bot/src/actions/medication/medication.task.ts
2024-12-28 20:09:43 +01:00

15 lines
407 B
TypeScript

import { CronJob } from "cron";
import { MedicationService } from "actions/medication/medication.service";
const medicationService = new MedicationService();
new CronJob(
"0 0 19 * * *", // cronTime
async () => {
console.log("askMedication()");
await medicationService.askMedication();
}, // onTick
null, // onComplete
true, // start
"Europe/Berlin", // timeZone
);