Most Spring Boot services end up with a scheduled job in them somewhere. A nightly reconciliation, a report, an export to some partner system. It starts small, and it goes in the main app because that's where the domain code already is.

One artifact, one deployment, one pipeline. That's a real advantage and it's why most teams do it.

This post is about when that stops being a good trade, how to split the job out, and when you shouldn't.

The memory problem

Look at how much memory each workload uses over a day.