I have three batch Jobs. Batch1, Batch2, Batch3. When the Batch1 starts executing it automatically calls on Batch2 to execute in finish method. Similarly Batch2 calls on Batch3 to execute in the finish method. Once Batch3 finish executing it sends out an email about any records not being processed and the details of the records from all the three batch jobs.
Now I need to schedule these batch jobs in 3 different ways. 1) Manual 2) Nightly 3) Hourly.
For Manual and Nightly schedules the Batch jobs need to be executed the way mentioned above( all three Batches needs to be executed sequentially). But for the hourly schedule only the first 2 (Batch1, Batch2 needs to be executed skipping the Batch3).
Any thoughts on how to schedule this?