I am currently implementing scheduled migration of data from external system to Sales Cloud. I would like to migrate data using bulk API and then, after the process is finished, schedule a batch process in Salesforce to further process the newly uploaded records. I checked the SOAP API but could only find the CronJobDetail and CronJob calls, which return details about scheduled jobs. Is it possible to schedule batch execution using any available Sales Cloud API?


SOAP API has Execute Anonymous Mehod. You can use it to your advantage.

ExecuteAnonymousResult[] = binding.executeanonymous(string apexcode);


String jobClassInstance = "new scheduledMerge()";
String cronJob = "20 30 8 10 2 ?";
String jobName ="MyJobName";
ExecuteAnonymousResult[] = binding.executeanonymous("System.schedule('+MyJobName+','+cronJob +cronJob +,+jobClassInstance ));

You could use the API call for executing anonymous Apex, and then use the same syntax you'd use to schedule it from Developer Console.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.