You need to sign in to do that
Don't have an account?
Error: Schedulable class has jobs pending or in progress?
I am trying to Run Schedule job........but Schedulable class has jobs pending or in progress? This Error is occurs again and again, i have deleted the scheduler class and tried again still same problem occurs if have any suggetions please let me know...... here is my scheduler class for send Emails to employee on his birth day :-
global class BirthdayMailSend implements Schedulable
{
global void execute (SchedulableContext ctx)
{
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
for ( Employee__c emp : [SELECT Id, Name,email__c,First_Name__c FROM Employee__c WHERE Birth_date__c = TODAY] )
{
mail.setSubject('New Employee Record Created..!');
mail.setHtmlBody('Hello'+emp.First_Name__c+'!<br/>today is your birth day bhikarya cake kap nahi tar muskadin');
mail.setToAddresses(new String[] {emp.email__c});
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}
BirthdayMailSend mc = new BirthdayMailSend();
String sch = '0 0,1 * * * *';
system.schedule('Birthdaymail', sch, mc);
}
}
Hi,
I think there are already some jobs are in progress or scheduled for this job. try to delete them and schedule them again.
Regars,
Sridhar Bonagiri
All Answers
Log a a case with salesforce support,they will help you in removing any stuck job.
Hi,
I think there are already some jobs are in progress or scheduled for this job. try to delete them and schedule them again.
Regars,
Sridhar Bonagiri
Yes Done !!! got the success
Thank you So much :)