function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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. 
*********** 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)