You need to sign in to do that
Don't have an account?
SUMAN KUMARI 70
Batch class to run everyday
Hi All,
I have a requirement where I need to write a batch class which will run everyday and will send an email to the owner 1 day prior to the closed date at 8 am pacific time.
Kindly please help me by providing the code for this use case.
Thanks a lot in advance.
I have a requirement where I need to write a batch class which will run everyday and will send an email to the owner 1 day prior to the closed date at 8 am pacific time.
Kindly please help me by providing the code for this use case.
Thanks a lot in advance.
Is this going to work even if the records are not getting edited/created?
As an overview you would do:
global class scheduledBatchable implements Schedulable {
global void execute(SchedulableContext sc) {
batchContactUpdate b = new batchContactUpdate();
database.executebatch(b);
}
}
And then run some code like:
scheduledBatch sb = new scheduledBatch();
String sch = '0 0 * * *';
String jobID = system.schedule('Batch COntact Update Job', sch, sb);
For further reference, you can check this too,
https://www.forcetalks.com/blog/how-to-schedule-the-batch-class-at-specific-time/
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.