You need to sign in to do that
Don't have an account?
Kamal Kishore Singh
Apex Specialist- Schedule synchronization :
Hi Guys
I have implemented the below class and also scheduled it .
Still getting an error.
Challenge Not yet complete... here's what's wrong:
The Apex class does not appear to be implementing the execute() method.
Very sad to see was not able to complete in the first attempt after making everything right.
public class WarehouseSyncSchedule implements Schedulable {
public void execute(SchedulableContext SC)
{
WarehouseCalloutService.runWarehouseEquipmentSync();
}
}
I have implemented the below class and also scheduled it .
Still getting an error.
Challenge Not yet complete... here's what's wrong:
The Apex class does not appear to be implementing the execute() method.
Very sad to see was not able to complete in the first attempt after making everything right.
public class WarehouseSyncSchedule implements Schedulable {
public void execute(SchedulableContext SC)
{
WarehouseCalloutService.runWarehouseEquipmentSync();
}
}
6/19/2016 1:50 PMScheduled ApexQueued 000Singh, Kamal WarehouseSyncSchedule 7072800001zrpLT
ActionJob NameSubmitted BySubmittedStartedNext Scheduled RunType
Manage | DelHowWeRollJobSingh, Kamal6/19/2016 1:50 PM 6/20/2016 1:00 AMScheduled Apex
First create a object for batch class in public void execute method block after this call a method Database.executeBatch(batch class object name). Examlple given below.
Thanks,
Nitin Sharma
As classes installed from manage package is public , you tend to mis this. There change the class and method to global
globalclass WarehouseSyncSchedule implements Schedulable {
global void execute(SchedulableContext SC)
{
WarehouseCalloutService.runWarehouseEquipmentSync();
}
}
Use the following steps sequentially as mentioned :
1. Create Schedule Apex from the Salesforce UI.
2. Use the exact setting mentioned in below image :
.
3. WarehouseSyncSchedule class should be like this :
This will help you to clear Apex Specialist #3 challenge.
Happy Trail Blazing :)
Hey Naveen,
Can we solve this problem entirely code based.. I mean not scheduling the class using UI.
public class WarehouseSyncSchedulerInvoke
{
public static void invokeschedule()
{
WarehouseSyncSchedule reminder = new WarehouseSyncSchedule();
// Seconds Minutes Hours Day_of_month Month Day_of_week optional_year
String sch = '0 0 1 * * ?';
String jobID = System.schedule('Scheduled Equipment Sync', sch, reminder);
System.debug(jobID);
}
}
global class WarehouseSyncSchedule implements Schedulable {
global void execute(SchedulableContext ctx) {
System.enqueueJob(new WarehouseCalloutService());
}
}
Set up-Apex classes-Schedule Apex
global class WarehouseSyncSchedule implements Schedulable {
global void execute(SchedulableContext ctx) {
System.enqueueJob(new WarehouseCalloutService());
}
}