• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[Tasker] How to wake the CPU (not screen) awake using Tasker?

You want to run the battery down by preventing the phone from sleeping? Like your own, personal wakelock?

Sorry, slightly flippant, but I am wondering what you are trying to achieve? Any app that is allowed to and forced to run in the background will keep the cpu aware, but to what end? Presumably you are actually wanting to keep some specific process from being optimised to sleep, rather than just burning cpu cycles for the sake of it, so a task that merely stops the device sleeping may not solve your actual problem.
 
You want to run the battery down by preventing the phone from sleeping" - my phone is continuously connected to power, so don't warry about the battery discharging...
what you are trying to achieve" - keeping the CPU alive.
task that merely stops the device sleeping may not solve your actual problem" - what task? what the task should to? I can write a loop in the task what does something each 1sec. Is this enough? What task would you suggest to write?

"what is the objective?" - I use the phone as a phome security camera, which should be triggered by a motion event. But ...the camera misses events. One of the possabilites why this happens is because the phone (cpu) goes to sleep (my guess). This is a reason why I want to keep my phone always alive (no sleep at all).

So, what's the solution?
 
If you think that's what's happening you need to ensure that the app you want to stay alive is excluded from any battery optimisation. My concern would be that the phone might keep Tasker running but put the app that's generating or checking for your "motion event" to sleep, which would be no help (one app staying awake doesn't mean that others necessarily will).

Can you just set it to keep the screen on when on charge? That should keep the phone awake (you can turn the brightness right down if you don't want it visible). If the system menus don't support that then I can see that one of Tasker's action options is Display > Stay On, which can be set to keep the screen on when on any combination of AC/USB/wireless charging..
 
the app you want to stay alive is excluded from any battery optimisation" - done... but it still happens (camera misses events)
one app staying awake doesn't mean that others necessarily will" - understood ...
"keep the screen on when on charge" - I can do this in Development Options... Keeping the screen ON will keep the WHOLE PHONE ON (no sleep at all)?
"one app staying awake doesn't mean that others necessarily will" - good advice :-) will do it :-)
 
On the Motorola Moto Z Force the brightness in Tasker set to zero …

It dims at the end of the time that is set
It never goes totally black

I could set the timeout to 23h 58m 59s

… Thom
 
Back
Top Bottom