Schedule Class for every One Hour Everyday in Salesforce

Write below code in "Developer Console" to schedule class for every One Hour Everyday. 


Apex Code:
NameofScheduleclassEveryhour objschclass =  new NameofScheduleclassEveryhour ();
string strSeconds = '0';
string strMinutes = '0';
string strHours = '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23';
string strDay_of_month = '*';
string strMonth = '*';
string strDay_of_week = '?';
String sch = strSeconds + ' ' + strMinutes + ' ' + strHours + ' ' + strDay_of_month + ' ' + strMonth + ' ' + strDay_of_week;
system.schedule('ScheduleclassEveryhour', sch, objschclass); 


                                  Thanks,
                              Sumit Shukla

Comments

Popular posts from this blog

Salesforce Spring 16 Release Exam (Maintenance Exam Q&A) for Developer 201 Admin

Show Hyper Link On Add Error in Salesforce Trigger

Show the Success Message before Redirecting the Detail page on Visualforce Page