You need to sign in to do that
Don't have an account?
Vamsee Karamcheti
How can I schedule a job in salesforce twice a day ?
Hi Friends,
Can you please explain me How can I stop existing job which is running in my environment and How Can I schedule new job which runs twice a day ?
Can you please explain me How can I stop existing job which is running in my environment and How Can I schedule new job which runs twice a day ?
Try this,
I assume you have created a Schedulable class. You can schedule it using the system.schedule command:
Step 1. In developer Console select debug menu and in that menu Open execute Anonymous Window
Step 2. Hope this will help you. Please mark the answer as a solution.
Regards,
Akshay
All Answers
To Stop Scheduled job :
Navigate to Setup => (In Quick Find box) Scheduled Jobs
Now you have the list of scheduled jobs. Delete those which you don't want to execute.
To schedule new job which runs twice a day Example To run twice a day, i.e 8 AM and 8 PM I hope it will help you.
Regards,
Akshay
Thanks for your reply. I have one more doubt Where should I use below line of code ? In Batch class ?
String sch = '0 0 11/12 * * ?';
Try this,
I assume you have created a Schedulable class. You can schedule it using the system.schedule command:
Step 1. In developer Console select debug menu and in that menu Open execute Anonymous Window
Step 2. Hope this will help you. Please mark the answer as a solution.
Regards,
Akshay
Please use this in the developer console Anonymous window. You will use something like below code.
For the running your Schedule class. Please fill your Schedule class name in the place of Schedule_CreateNewRecords .
Till if you have not created schedule class.I have attached the code below.
Schedule class name- In the place of batchclassname. please fill your Batch class name. Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
Thanks,
Harshit Garg
Please use this in developer console Anonymous window.
Thanks,
Harshit Garg