help me setup a cronjob that loops through my entire user table and updates a number
currently the following code errors out because i have more than 4096 user rows
doesn't seem like indexes would help so not sure how to solve this. i know i should batch the queries but not sure how to do it
here is the specific error i'm getting
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
managed to fix it by reading through this article
https://stack.convex.dev/migrating-data-with-mutations
specifically this piece of code
Stateful Online Migrations using Mutations
Online migrations in Convex using mutations, including a Convex Component to manage them.