Page 1 of 1

Flow stops when device goes to sleep

Posted: 04 Aug 2019 22:04
by ziotempa
Hi all
I run a flow which contains a loop which has to work for hours. Anyway my device goes to auto lock after 5 minutes. When this happens, the flow stops, so that when I unlock the phone I can see that the notification which shows the progress of the flow doesn't update any more and if I open the flow I cannot see any red brick. The flow has in fact stopped working
I can also tell you, as a side note, that I have a flow which is trigged every minute, that works good also when the display is off and the phone is locked
What am I doing wrong that this flow shuts down automatically?
Thank you
V

Re: Flow stops when device goes to sleep

Posted: 04 Aug 2019 22:21
by Rafi4
Hi ziotempa
I am in a bit confusion. Please post your flow.
From record4

Re: Flow stops when device goes to sleep

Posted: 05 Aug 2019 05:50
by ziotempa
Ok, here it is
flow_Rinomina_files_20190805_074852.xml
(11.58 KiB) Downloaded 1249 times

Re: Flow stops when device goes to sleep

Posted: 05 Aug 2019 14:35
by Martin
Hi,

It sounds like this would not be caused by a battery optimization of your device. Anyway, please check this page to see if there are instructions to disable battery optimization to see if this helps: https://dontkillmyapp.com/
If this still happens, could you please turn on Debug log and Write log to file in the preferences of Automagic, reproduce the issue and then send the log to me (menu->Log, menu->Send Log)?

Regards,
Martin

Re: Flow stops when device goes to sleep

Posted: 05 Aug 2019 16:09
by Desmanto
Beside the battery optimization, why it tooks hours just to rename files? How many files do you rename at one execution? That enormous 10000 AES should not be as big as that.

I studied your flow and it seems you want to rename any non IMG_ and VID_ files to IMG_ appended files in certain folder. If that is the case, you can actually do that in only maybe 3 elements (my rough concept) : Init files, script and then execute command. You can rename all at once, don't have to be looped al the way long. Even if the rename take so long per file (because rename happen at external sdcard), it should be at least much faster than many script/expressions.

Re: Flow stops when device goes to sleep

Posted: 05 Aug 2019 16:26
by ziotempa
Hi both, thanks for the answers

First: I did the main part of this flow some time ago and I feel that I couldn't run a rename command because of permissions even though now I don't remember well
Second: it took 7 seconds for a single rename (move command) but after I think an hour or so my SD card became unreadable. I guess there was already some problem with that, now I'm spending lot of time transferring all the content to my pc to save photos, music and so on. On the laptop it is readable but it's still taking a lot of time to transfer most of the files. So I think that the main problem of the slowness was related to the SD card.