Servicely does one simple job. The app launches a service every 60 seconds and check for the apps you have in the list. If the apps are running, Servicely kills them. However, if the app runs in a foreground service, the app won't be affected.
Servicely does almost the same thing as Greenify app does, it has beautiful design and it's free.
If you ever left your phone overnight and got 50% drain because of the useless apps running in the background, I ensure this won't happen anymore with Servicely.