I want to create a script that would close an app, then restart it twice each 24 hours and then automatically click on a few buttons to configure the app to the way it was previously.

Background: I use a tablet to monitor the live video from my security cameras with an app. The problem is that once or twice a day, the live video feeds lock up and do not update. Restarting the app fixes this.

Is there a way to do this? Please note that I don't know anything about scripting or coding. I was hoping that there might be a simple app that would allow me to create a series of instructions that would activate x times per day -- or to know where to find someone who could create this for me.

  • Do you have root, this is major for auto tap scripts Sep 5, 2016 at 21:17
  • Whether you manage to automate it or not, you should contact the app developer to tell them that their app breaks in this way. If there's no option to do it from inside the app, you can contact them from the app's page on Google Play.
    – Dan Hulme
    Sep 6, 2016 at 10:33

1 Answer 1


Call Super User ( root access )


change 1 second sleeper to 24hours

 sleep 86400

  sleep 1
  sh /directory to this script/autoscript.sh   

Close this script after opening another instance of it.
So all in one script it's

  sleep 1
  sh /directory to this script/autoscript.sh    

In this example,

you would need to make this as a text document and save it as autoscript.sh

Instead of autoscript.txt

Now open Terminal Emulator and type

sh storage/sdcard1/autoscript.sh

Terminal will auto start the script !

  • If I've helped, i think you say solution verified or something :) Sep 5, 2016 at 23:54
  • PT, I greatly appreciate that you have created this script. But the situation is that my tablet is not rooted and I also have no idea how to use this script: how to activate or run it. But you have certainly tried to be very helpful -- I just wish I knew enough so I could use your generous work.
    – A J
    Sep 7, 2016 at 7:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .