Page 1 of 1

Stop app after time

Posted: 18 Aug 2019 10:16
by OhLeut
Hello,
I want to end a started app after 9 hours
but the app will not stop
Screenshot_20190818-113743.jpg
Screenshot_20190818-113743.jpg (19.53 KiB) Viewed 5383 times

Re: Stop app after time

Posted: 19 Aug 2019 05:28
by Desmanto
Action Kill app can't kill app in foreground. You have to add action Show Home Screen first, then kill App.

BTW, it is not efficient to use sleep as long as 9 hours. It will create unnecessary wakelock, which keep your CPU awake and drain your battery much faster. (unless keep awake is one of your purpose). Better use Trigger Global Variable Date/Time in another flow. Set the timer to 9 hours in the future. You can create the glovar such as this

Code: Select all

global_kill_app_timer = addHours(triggertime, 9);
Then use global_kill_app_timer in another flow with the trigger Global Variable Date/Time