- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 11:41 AM
@Bert_c1 I don't want to run it "on demand" as that would require me to continually run it manually. "Periodically" is better because then I can schedule it to run every x minutes or hours or whatever timeframe I wish and repeatedly with a batching option so it doesn't saturate the server with a huge update that hypothetically could be the entire database. As I stated, this is a hypothetical update wherein I wanted to configure a batch job to run on a limited subquery of the database to update a lot of records but batched out to smaller chunks until completed. "On demand" would be like setting the job, but having to manually hit "execute now" over and over and over until they have all been completed. Doable if I were updating 1800 records in 100 record batches only 18 times, but what if I were updating 8,000,000+ records with a lot of updates? Do I lock up the database trying to run it on all those records at once? Let's say the updates are very resource intensive, so it would be best to ONLY run it in chunks of 100 records at a time. Any more, and it would lock the system and no one can get anything done until the batch is done. Do I have to hit the button to run 8000 times? Or set a job to chunk it out every 10 minutes, give the system time to breathe and users able to do some work, and over time will eventually have managed to process all the records? THAT is the intent of the question. I wasn't aware of the x_gr.setLimit(100); function nor some of the functions for setting up queries and x_gr.next() loops, considering I am a relative beginner developer in the environment.
All criticism aside, thank you for the advice. I understand you're just trying to help. ❤️ Just wanted to explain why that option would not work for my hypothetical scenario.