What you need is Firebase Job Dispatcher.
Running a Service for this is not a good idea because the operative system can kill to prioritize the app in the foreground. A Service is an excellent idea to create scalable apps that need background work while they are active, a music player or some REST app, by example.
Using an alarm, the AlarmManager is battery expensive and doesn't allow you to set constraints to what you want, what if you want to run your job only when the device is on Wi-Fi. Also, alarms are lost in device boot.
For doing something like catching network connection developers used to rely on BroadcastReceivers, but network connectivity is not available anymore since API 25 due the abused of it. That is why Android provide JobScheduler, the problem with it is that a JobScheduler is not retro-compatible and is only available API 23 and above. A costly solution is to use JobScheduler and AlarmManager.
Firebase Job Dispacther is much like a cron job with conditions, it will only execute when the conditions are met, can handle the boot, can be executed one or recursively, is battery efficient, and the window of time, while is executed, is well handled. This used to be GcmNetworkManager, is now updated.
Evernote did a similar library Android Job but I rather rely on the great people on Firebase and Google.