Activity Forums Salesforce® Discussions How to test scheduler class in Salesforce?

  • Shweta

    Member
    August 31, 2020 at 3:41 pm

    Test method for the scheduler class
    Example: public static testMethod void testSchedulerclass(){
    Test.StartTest();
    ScheduleTerritoryInactiveMemberCheck sh1 = new ScheduleTerritoryInactiveMemberCheck();
    String sch = '0 0 23 * * ?';
    system.schedule('Test Territory Check', sch, sh1);
    Test.stopTest();
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos