[Resolved] TASKER: Shutdown after 10min after power is disconnected, how to do this?

Search This thread

Evelen

Member
Mar 10, 2014
44
2
Ok, I have a Nexus 7, and I have successfully managed to start Car Home Ultra, wifi and bt when the powercable is connected.

But what I don't manage are to do this:

- when power is disconnected wait 10 min and than shutdown the tablet.
- exception: If power is restored within this time, do not turn off the tablet

can someone tel me how to do this?
PS: step by step, I have never used tasker
 

Attachments

  • Screenshot_2014-05-20-18-49-52.png
    Screenshot_2014-05-20-18-49-52.png
    31.8 KB · Views: 3,005
  • Screenshot_2014-05-20-18-50-05.png
    Screenshot_2014-05-20-18-50-05.png
    45.3 KB · Views: 2,990
Last edited:

Evelen

Member
Mar 10, 2014
44
2
seems like this worked:

edit: *wrong screenshot, will edit

EDIT:
 

Attachments

  • Screenshot_2014-05-20-2kkkkkkkkkkkkkkkkkkkkkk1-29-51.png
    Screenshot_2014-05-20-2kkkkkkkkkkkkkkkkkkkkkk1-29-51.png
    40.2 KB · Views: 4,805
Last edited:

Evelen

Member
Mar 10, 2014
44
2
yepp:

This config worked (see screenshot)

task->Power->Any Off

1. Wait: 10 Min
2. Reboot: Shutdown If AIR (Airplanemode) is on


This works because I use Timur's Kernel, and that kernel will automatically turn on airplanemode when going to deepsleep (when powercable is disconnected)
 

Attachments

  • ddd.png
    ddd.png
    40.2 KB · Views: 2,661
  • Like
Reactions: furious84

furious84

Senior Member
Aug 26, 2010
82
5
spilimbergo (pn) italy
Yes i also have timur's rom :) But what happen If after 5 minutes u plug power? I mean :u go To take bread then u off car, And after 5 minutes u return To car and on car. The task go To block, or continue and after 10 minutes (started when u off car) shutdown tablet? I hope u understand what i mean

Inviato dal mio Nexus 7 utilizzando Tapatalk

---------- Post added at 10:40 PM ---------- Previous post was at 10:38 PM ----------

Right after 10 minutes check if airplane mode is on then shutdown or not...

Inviato dal mio Nexus 7 utilizzando Tapatalk
 

Evelen

Member
Mar 10, 2014
44
2
Yes i also have timur's rom :) But what happen If after 5 minutes u plug power? I mean :u go To take bread then u off car, And after 5 minutes u return To car and on car. The task go To block, or continue and after 10 minutes (started when u off car) shutdown tablet? I hope u understand what i mean

Inviato dal mio Nexus 7 utilizzando Tapatalk

---------- Post added at 10:40 PM ---------- Previous post was at 10:38 PM ----------

Right after 10 minutes check if airplane mode is on then shutdown or not...

Inviato dal mio Nexus 7 utilizzando Tapatalk
If I turn of the car for 5 min it will go to deepsleep and then wake up when I turn on the car, the tablet will then be on and don't shutdown after the 10 min.

So you can say ut "block" the shutdown countdown when the power is on, this is because tasker checks if the flightmode is on.

flightmode on after 10 mins: Shutdown
flightmode off after 10 mins: nothing happens

Also: If you want to do this like me you should also see my other thread about autostart og power: http://xdaforums.com/showthread.php?t=2756771
 
  • Like
Reactions: furious84

snake2332

Senior Member
Dec 26, 2010
252
46
Montana
Haha you lazy guy you!

I do have the Nexus 7 fixed in my dash and want to accomplish this.

My Tasker profile is set to State -> Power Source AC.
The tasks include turning off airplane mode and launching a couple apps.
The exit tasks are to enable airplane mode and battery saver (and Greenify apps but that's old stuff), then shutdown the tablet. If I change it to include the "IF %AIR ~ on", it won't really work because the task will sit there for 15 minutes no matter what, then check for airplane mode and shutdown if it's in airplane mode. However, it will ALWAYS be in airplane mode because no other task or application has taken it out of airplane mode.
So I think I need two Profiles set to State, where one profile just checks for power source AC and launches my stuff, but with ZERO exit tasks.
Then I'll have another Profile also set to State of NO power source, that will constantly run on loop and shut down my tablet if there is no power source after 10 minutes of wait.

I think this will work because both profiles will be running at the same time, thus the "exit tasks" won't be needed, and the exit tasks are the barrier to my solution.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    yepp:

    This config worked (see screenshot)

    task->Power->Any Off

    1. Wait: 10 Min
    2. Reboot: Shutdown If AIR (Airplanemode) is on


    This works because I use Timur's Kernel, and that kernel will automatically turn on airplanemode when going to deepsleep (when powercable is disconnected)
    1
    Yes i also have timur's rom :) But what happen If after 5 minutes u plug power? I mean :u go To take bread then u off car, And after 5 minutes u return To car and on car. The task go To block, or continue and after 10 minutes (started when u off car) shutdown tablet? I hope u understand what i mean

    Inviato dal mio Nexus 7 utilizzando Tapatalk

    ---------- Post added at 10:40 PM ---------- Previous post was at 10:38 PM ----------

    Right after 10 minutes check if airplane mode is on then shutdown or not...

    Inviato dal mio Nexus 7 utilizzando Tapatalk
    If I turn of the car for 5 min it will go to deepsleep and then wake up when I turn on the car, the tablet will then be on and don't shutdown after the 10 min.

    So you can say ut "block" the shutdown countdown when the power is on, this is because tasker checks if the flightmode is on.

    flightmode on after 10 mins: Shutdown
    flightmode off after 10 mins: nothing happens

    Also: If you want to do this like me you should also see my other thread about autostart og power: http://xdaforums.com/showthread.php?t=2756771