And what would you guys recommend for job scheduling (I am using ktor for the main application) but have a bunch of tasks that need to be executed in certain intervals
f
FranSoto
09/07/2020, 12:42 PM
there was a PR to add an scheduler to ktor but was rejected. I used a cronjob that fire some gradle's tasks
FranSoto
09/07/2020, 12:43 PM
It isn't the best solution but it's flexible
f
fkrauthan
09/07/2020, 6:20 PM
hmm that doesn’t work very well with Docker unfortunately.
f
FranSoto
09/08/2020, 8:02 AM
yap, in that case you need an scheduler. try with java.util.Timer and launch a TimerTask
m
maxmello
09/09/2020, 10:00 AM
You could also expose the jobs as http endpoints and call them through an external cron job or another docker container that manages task scheduling. This way you can ensure that a job only runs once if you want to run multiple instances of your application.