+ Start a Discussion
Ken KoellnerKen Koellner 

Anyone know of any issue with destructiveChanges.xml and scheduled apex on a queueable?

I'm trying to deploy from one sandbox to anything via the ant migration tool using package.xml and destructiveChanges.xml.  I'm getting an error that the class is scheduled.  This is queueable, not schedulable.  I have other classes scheduled.  I'm not able to delete this via destructiveChanges.xml.  I was able to comment all the code and deploy a version that was empty.  I found that odd because usually if you something is scheduled, you can't deploy a new copy of it either. 

I'm wondering if there is some restriction I do not know about or if SF is acting up.  I'm not sure I want to take the time to run this issue by Tech Support. 
BUILD FAILED
/hmco_dev/SFDC/deploy/feature/IN25014_Rel31.4_ReleaseXYZ/build.xml:41:
*********** DEPLOYMENT FAILED ***********
Request ID: 0Afg000000fGqHjCAK

All Component Failures:
1.  classes/DoWOrkCalculatorQueueable.cls -- Error: This Schedulable class is in use. : Apex Class.

*********** DEPLOYMENT FAILED ***********

 
Alain CabonAlain Cabon
That seems a bug probably based on the queryable object from the workbench CronJobDetail.

SELECT Id, Name, JobType  FROM CronJobDetail

These are the available job types on the CronJobDetail SOAP API object. Each job type label is listed with its value in parenthesis. Use the job type value when querying for a specific job type.

Data Export (0)
Dashboard Refresh (3)
Analytic Snapshot (4)
Scheduled Apex (7)
Report Run (8)
Batch Job (9)

Regards.