En el foro de soporte de Tasker han planteado un problema parecido y esta ha sido la respuesta de Joao...
To make sure Tasker and the AutoApps run in the foreground:- Make sure Tasker is enabled
- Enable foreground notification in Tasker settings
- Enable the "Use reliable alarms" option
- Disable battery optimization for the apps
- Make sure the Android Settings -> Apps -> Tasker -> Battery -> Background activity option is enabled (this setting may be somewhere else on different OEMs, but it's a very important setting that might be disabled by default on some devices)
- On Xiaomi devices enable "Auto Start" for the apps and "Display on Lock Screen" under "Other Permissions"
- On Huawei devices disable Powergenie which stops apps from running in the background. Try going to Settings -> Battery, then tapping on the gear in the upper right corner. Disable "Close excessively power-intensive apps". Or use ADB:
To disable powergenie use: adb shell pm disable-user com.huawei.powergenie
To enable powergenie: adb shell pm enable com.huawei.powergenie
Hope this helps!