This is a common and widespread "problem" in scaled applications. There are thousand of solution, so there is no "right" answer for this. As a hint there is a feature when using quartz which is common and documented with quarkus: https://quarkus.io/guides/quartz
So it is up to you to read up on other solutions and find a fit for your case :)
Surprisingly, when there is a database table queue to be processed, only one docker container gets access to the table. I guess since there is a database level lock. The other docker container doesn't or can't do anything. That way the problem seems to have solved itself in a very unelegant way. There must be some repurcussions to this.
I have used a third party package called Shedlock. Here the Containers fight over locking a table and then one of them gets the lock. The one that gets the lock will get to run the cronjob. It seems to work well so far :-).
https://github.com/lukas-krecan/ShedLock