fix: await Notification.schedule() so notification fires before script exits

This commit is contained in:
Anthony Merlo 2026-08-21 00:10:45 +01:00
parent 2b5751d50e
commit aa05c9c8d4

View file

@ -49,11 +49,11 @@ function todayDate() {
return new Date().toISOString().slice(0, 10); return new Date().toISOString().slice(0, 10);
} }
function notify(body) { async function notify(body) {
const n = new Notification(); const n = new Notification();
n.title = "Health Sync"; n.title = "Health Sync";
n.body = body; n.body = body;
n.schedule(); await n.schedule();
} }
// --- Read all health metrics --- // --- Read all health metrics ---