How do I perform background app tasks with Capacitor?

Hey guys, so Im very new to Capacitor and I wanted to ask something. Im in need of background Geo location tracking, so I need my app to be able to be minimized (minimized is okay doesnt have to run while being closed) and I need it to update the location onto my server, is this something I would need my plugin for background Geo locating to do or is it possible for my Ionic app side of things to receive the Coordinates and pass it to my DB?

See the thing Im not sure about is the lifecycle, when the app is minimized will my react code still run? Or will I need to rely solely on Capacitor and the plugin for background stuff?