You need to sign in to do that
Don't have an account?
Karl Tschaepe
setting batch size on batch apex job
I have a batch job that typically fails due to governor limits. It is running in future state so the limit is often 10001 DML rows. The batch job is called from another scheduled batch job with the line:
System.scheduleBatch(new BatchReconciliation(year, email, false), 'Reconciliation Batch', 1, 200);
The result runs typically 40+ batches but has multiple failures.
If I change the call to:
System.scheduleBatch(new BatchReconciliation(year, email, false), 'Reconciliation Batch', 1, 20);
it runs over 400 batches, but completes without errors. Is there any drawback to running the job in so many batches? The time for completion seems about the same, but am i flirting with other governor limits?
Thank you!
System.scheduleBatch(new BatchReconciliation(year, email, false), 'Reconciliation Batch', 1, 200);
The result runs typically 40+ batches but has multiple failures.
If I change the call to:
System.scheduleBatch(new BatchReconciliation(year, email, false), 'Reconciliation Batch', 1, 20);
it runs over 400 batches, but completes without errors. Is there any drawback to running the job in so many batches? The time for completion seems about the same, but am i flirting with other governor limits?
Thank you!
i had set the batch size of 10 in the scheduler Apex.
global class testschedulerclass implements Schedulable{
global void execute(SchedulableContext SC) {
actualBatch b = new actualBatch();
database.executeBatch(b,10);
}
}
I scheduled the batch through anonymous window and the batch got failed with the error "Too many callouts: 101".
The same batch job executed successfully after scheduling it from UI. Its bit strange. Can anyone please let me know the reason for the failure...
Regards,
Chandra