Activity Forums Salesforce® Discussions How can we schedule a class to run every 30 min in Salesforce?

  • Surbhi

    Member
    September 6, 2016 at 1:35 pm

    Hi Mohit,

    You can try below code:

    system.schedule('Scheduled hourly job ', '0 0 0/1 1/1 * ? *', new NameOfBatchClassScheduler());
    system.schedule('Scheduled hourly job', '0 30 0/1 1/1 * ? *', new NameOfBatchClassScheduler());

    The first will schedule class for i.e. 10:00 , 11: 00,...etc. and the second will for i.e. 10:30, 11:30,.. etc.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos