I have a apex class which implements Schedulable interface, I want to find out whether this class is already scheduled or not? Please help me with SOQL query to find out this.
To find out if a given class is scheduled use an SOQL query like:
SELECT Id, CreatedById, CreatedDate, Status, CompletedDate FROM AsyncApexJob WHERE ApexClass.NamespacePrefix = :namespace AND ApexClass.Name = :className
Where namespace is your namespace (leave out if you are not in a package) and className is the class name string, such as "MyExampleSchedulable".
Best place to start is the Monitor Asynchronous Apex trailheal module. Gives nice SOQL queries, like:
AsyncApexJob jobInfo = [SELECT Status, NumberOfErrors FROM AsyncApexJob WHERE Id = :jobID];