Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
5

The only practical limit on batch size is how long you want your batch to run. A batch can iterate over millions of records. Would limiting the scope of the execute batch method to say 1 potentially cause reaching governor limits? Setting a scope size of 1 will reduce your risk of governor exceptions, but increase overall run time of your job. Does ...


1

In my opinion, the better practice will be separating your Scheduler into 2 different schedulable classes. According to the Interface segregation principle of SOLID, it's better have several specific schedulers (in your case) than one general-purpose with complex logic based on time intervals.


1

This is an undocumented bug (at least as far as I can tell), but basically, it occurs in situations where the execution time is so small it causes an integer underflow, and instead returns an absurdly large value as a result. I do find it curious that you got such a "small" number, as this bug usually manifests as a duration of 2,147,483,647 milliseconds, ...


1

The maximum number of SObjects a batch can process depend on the type of object returned from start. Iterable - the maximum number is 50000 since this is the maximum number of rows that you can query from the database in a session (the iterable is an in-memory representation of the whole set of objects to be iterated) Database.QueryLocator - the maximum ...


Only top voted, non community-wiki answers of a minimum length are eligible