You can make use of Web Periodic Background Sync API You can run this feature offline too and even app is closed, it doesn't require backend server for push as it triggers by the service worker periodically (min 24 hr I guess)
in your project files register sync event:
registration.periodicSync.register(constants.periodicBgSyncEventName, {
minInterval: syncMinInterval,
networkState: "any",
});
in your service worker file listen to the sync and show web notification:
self.addEventListener("periodicsync", (event) => {
if (event.tag === constants.periodicBgSyncEventName) {
self.registration.showNotification("Wake Time !!!", {
body: `Hi, Good Morning`,
});
}
});
Note - In order to use this Periodic Sync API you need to install the PWA first.