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

I've automated a tasker backup!!

  • Thread starter Thread starter Valiceemo
  • Start date Start date
V

Valiceemo

Guest
Pretty proud of this. Its a bit messy, but the best I could come up with. It will automate a tasker backup.*
I have it set to run in the dead of night at 3am.

Profile: Auto Tasker Backup (49)
********Day: Sun
********Time: 03:00
Enter: Auto Tasker Backup (4)
********A1: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]*
********A2: If [ %SCREEN ~ on ]
********A3: Flash [ Text:Tasker backup aborted Long:Off ]*
********A4: Stop [ With Error:Off Task: ]*
********A5: Else*
********A6: [X] Secure Settings [ Configuration:Keyguard Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]*
********A7: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]*
********A8: Secure Settings [ Configuration:Screen & Keyboard Lights On
1 Second Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]*
********A9: Launch App [ App:Tasker Data: Exclude From Recent Apps:On ]*
********A10: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]*
********<verify tasker is open>
********A11: Run Shell [ Command:dumpsys window windows | grep -E 'mCurrentFocus' Timeout (Seconds):0 Use Root:On Store Output In:%rawdump Store Errors In:%err Store Result In:%res Continue Task After Error:On ]*
********A12: Variable Search Replace [ Variable:%rawdump Search:\S+\. Ignore Case:Off Multi-Line:Off One Match Only:Off Store Matches In:%rawdump Replace Matches:Off Replace With: ]*
********A13: Variable Split [ Name:%rawdump1 Splitter:/ Delete Base:Off ]*
********A14: Variable Set [ Name:%currentapp To:%rawdump11 Do Maths:Off Append:Off ]*
********<if tasker is not open stop>
********A15: If [ %currentapp !~ net.dinglisch.android.taskerm ]
********A16: Flash [ Text:Tasker backup aborted Long:Off ]*
********A17: Stop [ With Error:Off Task: ]*
********A18: End If*
********A19: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]*
********<start key presses to navigate to backup>
********A20: Button [ Button:Menu ]*
********A21: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]*
********A22: Dpad [ Button:Down Repeat Times:2 ]*
********A23: Dpad [ Button:Press Repeat Times:1 ]*
********A24: Dpad [ Button:Down Repeat Times:1 ]*
********A25: Dpad [ Button:Press Repeat Times:1 ]*
********A26: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]*
********A27: Dpad [ Button:Right Repeat Times:2 ]*
********A28: Dpad [ Button:Press Repeat Times:1 ]*
********A29: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]*
********A30: [X] Secure Settings [ Configuration:Keyguard Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]*
********A31: Go Home [ Page:2 ]*
********A32: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]*
********<tap screen centre to remove dpad highlight>
********A33: Run Shell [ Command:input tap 617 935 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]*
********A34: System Lock*
********A35: End If*
********A36: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]*
********A37: Notify [ Title:Tasker Backed Up Text:Tasker profiles backed up %DATE Icon:cust_warning Number:0 Permanent:Off Priority:3 ]

If anyone can see a way to clean it up please do.*
Feedback would be welcome as this is probably my best achievement so far on tasker.*
 
Impressive!

You may also want to look under Tasker > (menu) > Preferences > Misc > Maximum Auto-Backup Age. With that set to anything other than "No Auto-Backups", Tasker will automatically make a backup every time the Tasker UI is exited via the main screen. The backups get stored in /sdcard/Tasker/autobackups/, and they'll stick around until the time period specified (in Auto-Backup Age).

For added awesome, I have a profile which uses FolderSync to back up that autobackups folder to my Google Drive each night. :thumbup:
 
Impressive!

You may also want to look under Tasker > (menu) > Preferences > Misc > Maximum Auto-Backup Age. With that set to anything other than "No Auto-Backups", Tasker will automatically make a backup every time the Tasker UI is exited via the main screen. The backups get stored in /sdcard/Tasker/autobackups/, and they'll stick around until the time period specified (in Auto-Backup Age).

For added awesome, I have a profile which uses FolderSync to back up that autobackups folder to my Google Drive each night. :thumbup:
Yeah I tried the auto backup in tasker preferences bit its messy (more than mine I think) and I don't need that many backups. Once per week is sufficient for me.
I also have a syncing profile to send backups to the cloud.
 
Back
Top Bottom