Need help on how to schedule a backend workflow without using a trigger element

Hi there,
I need a help on how to schedule a backend workflow. In my app, I send a reminder email to a user who has spent 2 days without interacting my app. I have a backend workflow that sends an email in 2 days from when it’s scheduled. I schedule that backend workflow just when a user clicks logs out. This really works. However, we have users who quit the app abaptly by closing the browser tab or leaving the laptop until it goes sleep and the session experies. For this case, am not scheduling this backend workflow so that the email can be send to them. How can I know that the session for the user has expired and how can I do it so that the app it’self after expering the user can schedule that backend workflow? You help is needed. I will be also heppy to know some hacks for this functionality. Thanks.