fix: await Notification.schedule() so notification fires before script exits
This commit is contained in:
parent
2b5751d50e
commit
aa05c9c8d4
1 changed files with 2 additions and 2 deletions
|
|
@ -49,11 +49,11 @@ function todayDate() {
|
|||
return new Date().toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
function notify(body) {
|
||||
async function notify(body) {
|
||||
const n = new Notification();
|
||||
n.title = "Health Sync";
|
||||
n.body = body;
|
||||
n.schedule();
|
||||
await n.schedule();
|
||||
}
|
||||
|
||||
// --- Read all health metrics ---
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue