You need to sign in to do that
Don't have an account?
kundlik Yewale
Test class failing with below error:System.AsyncException: The Apex job named "Set Work Order auto assign job" is already scheduled for execution.
Test class failing with below error:System.AsyncException: The Apex job named "Set Work Order auto assign job" is already scheduled for execution.
global void finish(Database.BatchableContext BC)
{
min = Integer.valueOf(System.label.Work_Order_Auto_assignment);
batchSize=Integer.valueOf(System.label.Batch_size_for_auto_assignment);
System.scheduleBatch(this, 'Set Work Order auto assign job', min, batchSize);
}
global void finish(Database.BatchableContext BC)
{
min = Integer.valueOf(System.label.Work_Order_Auto_assignment);
batchSize=Integer.valueOf(System.label.Batch_size_for_auto_assignment);
System.scheduleBatch(this, 'Set Work Order auto assign job', min, batchSize);
}
All Answers
See the schedule jobs which already exists with the schedule job name and delete them wether they are not schedule in future .
If they have scheduled for future runs then change ur new schedule job name.
we cant have mutilple schedule jobs with same name wether they have future runs or not.
Changing the Job Name lets you schedule the job.
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya