I have a docker file which runs a python script which should periodically (every 20 minutes) download a json file with an api call.
As far as I can see I can choose between two options to schedule this job:
- Within Python using e.g. apscheduler, shed or schedule
- Schedule the docker file using cron or systemd timers
Questions:
- Have I missed any options?
- In general, under what conditions would one chose one over the other?
- Am I correct in assuming option 2. is preferable for my particular case?