You need to sign in to do that
Don't have an account?
Manually Run Scheduled Task from Dev Console
Can someone tell me how to run this scheduled job manually from the Developer Console?
Thank you
global class ScheduleBatchCreateMonthlyCharges implements Schedulable { public ScheduleBatchCreateMonthlyCharges() { } global void execute(SchedulableContext SC) { Id batchInstanceId = database.executeBatch(new BatchCreateMonthlyCharges(), 1); } }
Thank you
1) http://amitsalesforce.blogspot.com/2016/02/batch-apex-in-salesforce-test-class-for.html
How to Schedule scheduler class
There are two option we have schedule the scheduler classes.
1) By System Scheduler.
2) By Developer console
System Scheduler.
Step 1) Click on Setup->Apex class. Then search Schedule Apex button.
Step 2) Select the scheduler class and set Time like below screen shot.
By Developer console
Execute below code from developer console :-
Let us know if this will help you
Thanks
AMit Chaudhary
All Answers
1) http://amitsalesforce.blogspot.com/2016/02/batch-apex-in-salesforce-test-class-for.html
How to Schedule scheduler class
There are two option we have schedule the scheduler classes.
1) By System Scheduler.
2) By Developer console
System Scheduler.
Step 1) Click on Setup->Apex class. Then search Schedule Apex button.
Step 2) Select the scheduler class and set Time like below screen shot.
By Developer console
Execute below code from developer console :-
Let us know if this will help you
Thanks
AMit Chaudhary
Thank you again
ScheduleSalesTargets c = new ScheduleSalesTargets();
c.execute(null);
OR
Check the Time Now, if it is, let's say 10:39 AM, in your clock then set the minute to 41. This will schedule the job for 10:41 AM just two minutes from now. But, if you set minute value to 38, then it will schedule to next hour 11:38 AM
ScheduleSalesTargets c = new ScheduleSalesTargets();
String sch = '0 0 * * * ?';
System.schedule('Sales Target Job11', '0 41 * * * ?', c);