You can run using an anonymous window. You can take reference from the below syntax. ClassName name1= new ClassName (); String cronExp= '0 0 * * * ?'; System.schedule('Scheduled', cronExp, name1);
If you find your Solution then mark this as the best answer.
In that window create a object of your Schdule Apex class then call excute() method passing as null like below
YourScheduleApexClass s=new YourScheduleApexClass();
s.excute() ;
Thanks,
Vijay
Thanks,
Vijay
1) http://amitsalesforce.blogspot.in/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
By Developer console
Execute below code from developer console :-
AccountUpdateBatchJobscheduled m = new AccountUpdateBatchJobscheduled();
String sch = '20 30 8 10 2 ?';
String jobID = system.schedule('Merge Job', sch, m);
Let us know if this will help you
Thanks
AMit Chaudhary
What does sch mean?
Can you please explain why you have those respective values?
Thanks,
'sch' is just the variable name being assigned to schedule in the code above
You can learn more at:
https://trailhead.salesforce.com/en/content/learn/modules/asynchronous_apex/async_apex_scheduled
and
https://developer.salesforce.com/docs/atlas.en-us.224.0.apexcode.meta/apexcode/apex_scheduler.htm
Hi Santhosh,
You can run using an anonymous window. You can take reference from the below syntax.
ClassName name1= new ClassName ();
String cronExp= '0 0 * * * ?';
System.schedule('Scheduled', cronExp, name1);
If you find your Solution then mark this as the best answer.
Thank you!
Regards
Suraj Tripathi