Hello,
I am looking for a quick advice. My client requires his employees using the app to be reminded to "check-in" every 2 hours (kind of like to confirm "yes, i am still alive", :slight_smile: ).
Then, if they don't check-in within 10 minutes, their boss wants to be notified so he can call them (they work alone in remote places and it's a safety requirement).
So, basically:
On the phone there must be a task being executed every two hours (the reminder)
If there is no response within 10 minutes, send a notification back
How would you approach this?
My idea would be to:
set up a scheduled task on the server, that runs every 2 hours, and sends them a push notification
run another task 10 minutes later to check if the user checked-in
when the user clicks on the notification, i submit a check in
Now, i think it should work, however I have to run 2 scheduled tasks every 2 hours etc etc.
Is there a better way? I thought about handling this on the phone but i think it would require background tasks to run all the time in iOS and Android, which would be a little painful to set up, especially if you can't make them run when the app is closed etc...
Any idea? Thanks!