public class CronTriggerListC {
public List<CronTrigger> cronList{get;set;}
public CronTriggerListC(){
cronList = [SELECT Id FROM CronTrigger];
}
}
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
public class CronTriggerListC {
public List<CronTrigger> cronList{get;set;}
public CronTriggerListC(){
cronList = [SELECT Id FROM CronTrigger];
}
}
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Greetings to you!
You can query from CronTrigger object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_crontrigger.htm
Below is the sample code which I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
You can query from CronTrigger object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_crontrigger.htm
Below is the sample code which I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
//You can get it from CronTrigger object query. Say for example:
[SELECT Id,CronJobDetail.Name,CronJobDetail.Id, State FROM CronTrigger where CronJobDetail.Name =:<Add filter here> AND State !='COMPLETE']
//This will give you the scheduled jobs if any:
See : https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_crontrigger.htm
//You can also check jobs in batch finish method :
AsyncApexJob apexJob = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email
FROM AsyncApexJob WHERE Id = :BC.getJobId()];
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com