AsyncApexJob a = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed,
TotalJobItems, CreatedBy.Email
FROM AsyncApexJob WHERE Id =:BC.getJobId()];
* Above syntax is to retrieve information regarding to the jobs.
Batch_classname bs = new Batch_classname();
Datetime sysTime = System.now();
sysTime = sysTime.addminutes(6);
String chron_exp = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' +
sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();
System.schedule('Update Actual'+sysTime.getTime(),chron_exp, bs);
No comments:
Post a Comment