Send location updates even after app is terminated

How do i send send updates about my location even after the app is killed.

Or how to schedule a periodic api call even after the app is terminated.


Thank you