Deployment of class used in schedule job fails
Issue #2571
open
Hello,
During deployment of class used in scheduled batch class, deployment fails, however it’s allowed in
Deployment settings “Allow deployments of components when corresponding Apex jobs are pending or in progress.”
When we are doing pipeline deployment → it works
When deploying class via IC2 - fails
Another think -
private static Boolean checkSomething(CustomObject record) {
return record.customField__c.equalsIgnoreCase('cats');
}
Method crying that ‘Missing return statement’ after replacing record.customField__c == 'cats' to equalsIgnoreCase
Comments (2)
-
repo owner -
repo owner - changed status to open
- Log in to comment
Thanks for reporting. Something must have changed recently as previously only classes that implement
Schedulable
directly would fail when deploying via the Tooling API, and IC2 automatically looks for that situation and routes such deployments via the Metadata API. Now it seems that if something even peripherally related toSchedulable
implementations is deployed via that API, it fails.The workaround is to disable Tooling API-based deployment for Apex in Illuminated Cloud | Configuration Application | Validation and Deployment. I’ll investigate and try to figure out the pattern (if possible) and update IC2’s corner-case logic to handle it.