You need to sign in to do that
Don't have an account?

Schedule Job is Queued and never executes
I have this code scheduled to run daily at 1PM EST.
But however when i see the Apex Jobs, it shows as queued and never has executed.
Any help would be appreciated.
Here is the code
global class ScheduleFlagBouncedEmail implements Schedulable
{
global void execute(SchedulableContext SC)
{
CheckForBouncedEmails chk = New CheckForBouncedEmails();
chk.FlagContactMailingCode();
}
}
--- And the Class and method called in the above code is something like this---
public class CheckForBouncedEmails
{
public void FlagContactMailingCode()
{
// Get the Last Sync Date from the custom setting object
...
// Grab the new records that bounced from the object where they are managed
...
// Grab the Contacts now that bounced in the above list
...
//check if its a business email or Home email, update the respective mail code to 'Bad Email - BE'
...
// update the above in bulk
}// method close
} // class close
I scheduled the "ScheduleFlagBouncedEmail " by navigating to Apex Classes -> Schedule Apex -> gave a name and selected this class and selected every day and to run at 1PM for the entire month.
But however when i see the Apex Jobs, it shows as queued and never has executed.
Any help would be appreciated.
Here is the code
global class ScheduleFlagBouncedEmail implements Schedulable
{
global void execute(SchedulableContext SC)
{
CheckForBouncedEmails chk = New CheckForBouncedEmails();
chk.FlagContactMailingCode();
}
}
--- And the Class and method called in the above code is something like this---
public class CheckForBouncedEmails
{
public void FlagContactMailingCode()
{
// Get the Last Sync Date from the custom setting object
...
// Grab the new records that bounced from the object where they are managed
...
// Grab the Contacts now that bounced in the above list
...
//check if its a business email or Home email, update the respective mail code to 'Bad Email - BE'
...
// update the above in bulk
}// method close
} // class close
I scheduled the "ScheduleFlagBouncedEmail " by navigating to Apex Classes -> Schedule Apex -> gave a name and selected this class and selected every day and to run at 1PM for the entire month.


You can find the explanation here: https://help.salesforce.com/apex/HTViewSolution?id=000186598&language=en_US