What's the best practice to run a task per second? #2888
Unanswered
kingyue737
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to let my nitro server fetch data from another service per second and save the response to the database. What's the best practice to achieve this? I see nitro has a functionality of tasks, but it seems not designed for this case. Maybe define a plugin and use
setInterval?All reactions