You need to sign in to do that
Don't have an account?

Help with batch/scheduled apex
Hey everyone-I'm trying to figure out the best way to transfer Account ownership of certain accounts once a day. I would use declarative tools but can't because the data that would fire the automation is coming from a couple of custom formula fields. I'm confused whether I need to write a scheduled class, a batch class or a scheduled batch class. I've gone through trailhead and sfdc help docs and am still unclear on how to accomplish this. Any pointers on how to get started are much appreciated.
Reason is
- You can able to run the batch job once on large amount data
- If you want to re-run the same code based on the schedule you can able to call the batch apex from the schedule ..
So with this approach, you are writing the code that will be used for one time as well scheduledAnd here is my test class:
I appreciate the help!
Test class