You need to sign in to do that
Don't have an account?
Coolday
How to schedule my batch class for every 6 hours ?
How to schedule my batch class for every 6 hours ?
This is my scheduler -
This is my scheduler -
global class UpdateBatchSchedule implements Schedulable{ global void execute(SchedulableContext ctx) { UpdateBatch p = new UpdateBatch(); database.executeBatch(p,200); } }
Can you try the schedular as below cron job for scheudling it. it runs at 12am, 6AM,12PM,6PM every day
You can use the same class which you have written . Just execute this in anonomous window.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Can you try the schedular as below cron job for scheudling it. it runs at 12am, 6AM,12PM,6PM every day
You can use the same class which you have written . Just execute this in anonomous window.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
will this work ?
I am getting this error
Method does not exist or incorrect signature: void schedule(String, String, UpdateBatch) from the type System
I have updated the code can you check my previous answer.
Thanks,
Do I have to run it every time in anonymous window?
Thanks
No it is not needed to run every time. If you run this once in each sandbox then this class will be scheduled every 6 hours like I mentioend above.
Thanks,
What about production?
Thanks and Regards
Yeah it will be same in production as well. You have to run this once in production as well.
Thanks,