My app requires a thread (e.g, nitro task) to start on application startup. It will run as long as the app is running.
It performs some logic - fetch data from database, do some calculations and update rows. It's a timely process, so rows are handled at certain time.
How can I achieve this with Nuxt? I tried server/plugins, but it blocks other plugins and feels wrong (it's not a plugin, it's a long running task). I can't use tasks as it's not a scheduled task.
I thought about maybe creating this as a task, and have a plugin that triggers this task on startup. Would that work? Is there another way to achieve triggering long running tasks on startup?