The UWP app for desktop must run on latest Win 10 (build #17134.165) and consist of two components: GUI Front End/foreground and background tasks. Foreground (GUI) task will wait 20 seconds before sending a message to the background task and then Close the GUI Window. This message will contain the amount of seconds (30 seconds) to wait by background before waking up the foreground task (that is open the GUI window). After being waken, the foreground task will pause for 20 seconds before messaging the background and closing the window/app.
This is estimated to take 2 days for intermediate UWP programmer with experience in C# and multi-threading and messaging [like named pipe or App Service or other forms of IPC].