There are a couple of examples of how we could use Spring Batch without persisting metadata to database. Here are some examples and related questions regarding the matter:
However I have a slightly different use case: I have some jobs that run every hour or so, of which I would like to persist the metadata into my database (e.g. creating reports, running some tests, both of which might be slightly heavy in processing). I have some other types of jobs that run every minute or so (e.g. unlocking user accounts which are locked due to repeated wrong entry of password, etc.) which do not involve much of processing but a simple sql query.
Here's the question in two parts:
Is there a way to keep metadata of the first type of jobs (e.g. reports processing) in the database while not using database persistence at all for second type of jobs (e.g. unlocking user accounts)?
Or, would even using Spring Batch for second type of jobs be overkill/not needed at all? Would a method with
@Scheduled
annotation be enough?