+ Start a Discussion
dvinternal1.3966475324914731E12dvinternal1.3966475324914731E12 

Apex Job stays in Queued Status

I just created a job and I'm trying to make it run automatically. It seems to be scheduled ok, but then the scheduled time comes and goes and the code never runs. The job stays in the Queued status.

The code makes a single SOAP call, then updates 3 accounts and 3 contacts. It works fine when I run it from the Execute Anonymous window.

Looks like it still fails if I remove the code from the execute() method.

Here is the Schedulable class:
global class SchedulableSyncSalesforceJob implements Schedulable {
global void execute(SchedulableContext SC) {
  SyncSalesforceJob j = new SyncSalesforceJob();
     j.run();
    }
}

Using this code to schedule the job:
SchedulableSyncSalesforceJob j = new SchedulableSyncSalesforceJob();
String sch = '00 00 * * * ?';
String jobID = system.schedule('SchedulableSyncSalesforceJob', sch, j);

I'm using a free developer account if that matters.

Thanks,
Sarel
Satish_SFDCSatish_SFDC
This is odd.
Probably Salesforce support will be able to figure it out.

Regards,
Satish Kumar