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
bhagya manshanibhagya manshani 

regarding Apex Scheduler .............Please do the needful Plz.....

// Here is my Apex class........

 

   global  class schedule_class  implements Schedulable  {
   
        //public static String CRON_EXP = '0 0 20 * * ? 2010';     //'0 0 0 3 9 ? 2022'
     global void execute(SchedulableContext ctx)
     {
     
        System.debug('**************************************');
      }
 }

// End of Class

 

// Here is my test method to call that class

 

  @isTest
private class mergeNumbers {

    static testMethod void myUnitTest() {
        // TO DO: implement unit test
        schedule_class m = new schedule_class();
        String sch = '20 30 8 10 2 ?';
        system.schedule('Merge Job', sch, m);
    }
}

// My Question  is : When i test this method on that Execute () is not Covering Or we can say that not able to get execute()

   Please Help...............Dear Thanks a lot in Advance plz    

bob_buzzardbob_buzzard

There's information on testing scheduled apex here:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm

bhagya manshanibhagya manshani

Dear Thanks for Responding but

 My Question is ...............

Why i am not able to access Execute method  from test class