wip medication and db (sqlite)

This commit is contained in:
Moritz Riese
2024-12-28 20:09:43 +01:00
parent 06ef16581c
commit 03d36358bf
19 changed files with 191 additions and 46 deletions

View File

@@ -0,0 +1,16 @@
import { CronJob } from "cron";
import { WaterMeService } from "actions/waterMe/waterMe.service";
const waterMeService = new WaterMeService();
new CronJob(
"0 0 0 */1 * *", // cronTime
async () => {
console.log("isThirsty()");
await waterMeService.isThirsty();
}, // onTick
null, // onComplete
true, // start
"Europe/Berlin", // timeZone
);
// job.start() is optional here because of the fourth parameter set to true.