Источник:
http://blogs.bojensen.eu/?p=4749
==============
If you need to execute code in batch, here is an example of how to add a batch job for the corresponding RunBaseBatch class. Solution public static void scheduleBatch() { BatchHeader batchHeader; BatchInfo localBatchInfo; YourRunBaseBatchClass yourRunBaseBatchClass; SysRecurrenceData sysRecurrenceData = SysRecurrence::defaultRecurrence(); ; yourRunBaseBatchClass = YourRunBaseBatchClass::construct(); // retry 3 times sysRecurrenceData = SysRecurrence::setRecurrenceEndAfter( sysRecurrenceData, 3); // retry [...]
Источник:
http://blogs.bojensen.eu/?p=4749