• dvinternal1.3966475324914731E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
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