Titanium Backup schedules not executed

khaberz

Senior Member
Jun 17, 2017
144
42
0
Is anyone else having the issue of TB schedules not being executed when the phone is sleeping? I have set all the Battery Optimizations set to manual for both TB and the TB root key app. Sometimes the scheduled task is started when I wake up the phone and sometimes (at night) it's being ignored entirely. I am on rooted Oreo stock but I saw the same on Nougat.
 

khaberz

Senior Member
Jun 17, 2017
144
42
0
Fixed

Is anyone else having the issue of TB schedules not being executed when the phone is sleeping? I have set all the Battery Optimizations set to manual for both TB and the TB root key app. Sometimes the scheduled task is started when I wake up the phone and sometimes (at night) it's being ignored entirely. I am on rooted Oreo stock but I saw the same on Nougat.
OK, fixed it - I had to activate it under Ignore Battery Optimizations
 
  • Like
Reactions: dheerajthe1

khaberz

Senior Member
Jun 17, 2017
144
42
0
Having the same problem. Where is the option for "Ignore Battery Optimizations", is it a Titanium option or a system option? Thanks
It's a system setting, somewhere under the Battery settings. I am not on EMUI anymore, so I can't tell you exactly. However, it didn't fix my problem permanently. I have moved on to LineageOS meanwhile, where these problems don't exist anymore.
 

fjherna

Member
Jan 12, 2012
13
2
0
Currently at Cologne (DE)
It's a system setting, somewhere under the Battery settings. I am not on EMUI anymore, so I can't tell you exactly. However, it didn't fix my problem permanently. I have moved on to LineageOS meanwhile, where these problems don't exist anymore.
Unfortunately it does not work in my Xiaomi redmi Note 4X.
I found the option to activate "Ignore Battery Optimizations", however if I don't leave the Titanium backup PRO running, the scheduled backups are not performed.
:(

Last week I have been searching internet for a solution, however still I have not found a satisfactory one.

Kind regards and thanks for your advice,

Javi
 

paarnoutse

Senior Member
Mar 6, 2014
113
88
58
Titanium Backup schedules not executed (or interrupted after being started) and/or its related notifications not being shown appears to be an issue that is caused by crazy additional 'features' as implemented at some devices to improve battery life. This especially happens at OnePlus devices running Oreo (Android 8), but may possibly also appear at devices of other brands (Xiaomi?). Therefore it actually isn't a shortcoming of Titanium Backup itself, but the result of some stupid app handling and killing behaviors that may be active at your device.
Also other apps that should permanently be kept running in background may be impacted by this behavior (being killed for the same reason) like Tasker, Sync-to-cloud apps, etc.

Especially at OnePlus devices running Oreo, following implemented crazy 'optimization' behaviors are playing a role here:

  • After a user has set Battery optimisation OFF for a specific app, it may automatically be set ON again after a reboot or after the app was updated
  • Background services may be killed EVEN when for the related app the Battery optimisation was set OFF
  • The 'Autostart' attribute may be ignored, so apps may be NOT automatically started in background after rebooting your device


SOLUTION


1. Make sure the 'Advanced optimisation' options are disabled

  • Go to Settings > Battery > Battery optimisation
  • Click the 3 dots in the upper-right corner and select 'Advanced optimisation'
  • Verify that the options 'Advanced optimisation' and 'Sleep standby optimisation' are both disabled


2. Set Battery optimisation OFF for any app that should continue to run in background

  • Go to Settings > Battery > Battery optimisation
  • Select the app that should never be killed, so in this example: 'Titanium Backup'
  • Select 'Don't optimize' and click DONE
Nb.
Above is not needed for the 2nd entry 'Titanium Backup PRO', which is just related to your PRO key payment and not the running Titanium Backup process itself.

However, disabling Battery optimization for an app is NOT enough for preventing that it could be killed when running in background at OnePlus devices!
This not only because the 'Don't optimize' setting may automatically be reverted to 'Optimize' after a reboot or after an update of the app, but EVEN when Battery optimisation is actually disabled it's nevertheless still candidate for being killed at OnePlus devices running Oreo! Therefore also next action is required in addition.



3. Lock the app in your 'Recent Apps' list

  • Open and then close Titanium Backup (or just touch the Home button at your device after opening the app)
  • Touch the 'Recent Apps' button at your device
    This shows your recent apps, where Titanium Backup will now be included (as last / most recent entry)
  • Toggle the 'Lock' icon in the upper right corner of that Titanium Backup entry, to switch it to a closed lock icon symbol
    (see attached screenshot)
This last action not only just prevents that the app could be removed from your 'Recent Apps' list, but it ALSO prevents the issues as described above, so:

  • The app will not be killed anymore when running in background
  • The 'Battery optimisation' setting for that app will not be reverted anymore to 'Optimize' after a reboot or after an update of the app

When done, Titanium Backup schedules should now run as defined. Also, its completion messages shouldn't disappear from your notification entries anymore, but kept until you remove them.



OTHER APPS

Because it's not just a specific Titanium Backup issue but the result of the stupid behavior as implemented at OnePlus devices running Oreo, it's highly recommended to repeat the steps above for any app that should never be killed when running in background (eg. Tasker, Sync-to-cloud apps, Alarm/Alert apps, etc.). Also apps that are making use of scheduled actions, or should awake at incoming messages, chats, mails, alarms, or Security/Anti-virus apps etc. could be candidate of not being able to react properly because they were killed when running in background and/or not started at boot. When such apps doesn't always correctly react/awake at your device, just perform same actions as described above to prevent them to be killed. When an app still doesn't work because it wasn't auto-started at boot, you could use Tasker to create a Tasker-profile that executes a Tasker-task to launch such apps at boot. Start-at-boot via Tasker appears to be not required for Titanium Backup, but for some other apps this was my only option to ensure that they were auto-started after a reboot of my device.

Nb.
Some apps have options included in their internal settings like 'Keep active in background', 'Run in Foreground' or 'Turn off battery optimisation'. Even when these types of internal app settings are selected, they could still be killed at some device brands (eg. OnePlus) when the actions as described above aren't implemented in addition for such apps.


OnePlus: Never settle, but also never be so stubborn...
 

Attachments

Last edited:

lm089

Senior Member
Jun 26, 2011
454
151
73
Munich
Just stumbled over this post through a link. Many thanks for the info; in my case it's not only TB that's effected but also several other apps like OruxMaps and Automagic.

For completeness I post some screenshots from OnePlus 6 / OOS 9.0.4 (Pie) showing the changed recent apps screens and dialogs (in German, but I guess you'll get the picture)
 

Attachments

  • Like
Reactions: paarnoutse

doggydog2

Senior Member
Jul 2, 2007
525
204
43
Titanium Backup schedules not executed....
OnePlus: Never settle, but also never be so stubborn...
i was wondering why titanium is not executed in months.. and killed shortly even when i run it manually.
settings were great:
- no battery optimization
- no data optimization
- tons of free memory on RAM boasting 1+ (funny isn't it)
- recent app management=normal clear
- standby check=exempted
- keep activities
- deep optimization turned off
- sleep standby optimization turned off
and still it didn't help until i LOCKed the app. this is why 1+ and xiaomis achieve better battery scores than samsung:)
 
  • Like
Reactions: paarnoutse

lm089

Senior Member
Jun 26, 2011
454
151
73
Munich
...this is why 1+ and xiaomis achieve better battery scores than samsung:)
(Spoiler: heavy OT post)

...which is what I really love about my 1+: 3 - 4 days between charging aren't rare here.
For the very few apps that are having probs (like track recording) with heavy battery optimization I wrote myself a script (am using automagic, but this should be also possible with Tasker etc) to disable deep opt. then start my critical app. Works great for me, but as always: ymmv ;)
 

lm089

Senior Member
Jun 26, 2011
454
151
73
Munich
Thanks for taking the time to reply. Appreciate it.

Still not seeing it.



Where do I click?
Your screenshot shows the app settings. You need to bring up the "recents" screen instead. If you're using the standard navigation bar that is the square button at the right end of the nav bar (screenshot #1, blue mark).
Then you flip through your recently opened apps until you find the one you're looking for. From then on it's as I described before: tap the 3 dots (screenshot #1, red mark). in the pop up menu select the "lock" entry (screenshot #2, green mark)
=== UPDATE: added some screenshots ===
 

Attachments

Last edited:
  • Like
Reactions: James_Oakley

James_Oakley

Senior Member
Nov 1, 2018
93
25
0
Your screenshot shows the app settings. You need to bring up the "recents" screen instead. If you're using the standard navigation bar that is the square button at the right end of the nav bar (screenshot #1, blue mark).
Then you flip through your recently opened apps until you find the one you're looking for. From then on it's as I described before: tap the 3 dots (screenshot #1, red mark). in the pop up menu select the "lock" entry (screenshot #2, green mark)
=== UPDATE: added some screenshots ===
Thanks - got it. When I read about "recents" in this thread earlier, I assumed it was when you go to Settings > Apps and you're first shown a list of recent apps. I've now got what everyone is talking about, thanks to your patient explaining. I'm sure this will help others too. On my phone, there's no nav bar it's all done with gestures, so you swipe up from the bottom of the screen - then lock Titanium in place. Bingo, and thank you.