function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JA-DevJA-Dev 

Is it possible to schedule a Batch Apex job hourly?

Hi,

 

I've seen this example that shows how to leverage the Scheduling API to set jobs to run on an hourly basis. But can I set up a Batch Apex job to run hourly as well? If so, can someone guide me through the process? I already know how to write and set up Batch Apex jobs that run daily, but need help getting them to run hourly.

 

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You can.  All you need to do is have your schedulable class instantiate and execute the batch apex.

All Answers

bob_buzzardbob_buzzard

You can.  All you need to do is have your schedulable class instantiate and execute the batch apex.

This was selected as the best answer
JA-DevJA-Dev

Thanks for the advice :smileyhappy: I made the necessary changes to my Batch Class (now it implements the Schedulable interface w/ its execute method) and then scheduled it via the System Log. The batch job has been running for a few hours now and it's working great!

Pal2011Pal2011

Hi,

 

Is there any other way I can schedule this scheduler class to run Batch Apex on hourly base except System log or Anonymous block ?

 

Thanks,