Skip to main content

Salesforce Schedule Jobs Examples

Hourly
     ClassName m = new ClassName();
     String sch = '0 0 * * * ?';
     system.schedule(' Update xyz (hourly)', sch, m);

Every 4 hours

     ClassName m = new ClassName();
     String sch = '0 0 0,4,8,12,16,20 * * ?';
     system.schedule(' Update xyz (every 4 hours)', sch, m);


Nightly @10pm

     ClassName m = new ClassName();
     String sch = '0 0 22 * * ?';
     system.schedule('Update xyz (Nightly @10pm)', sch, m);




Additional References:

Comments

Popular posts from this blog

Override Name in the Salesforce Cloud Console

Service Cloud Console HyperLink Opens new window outside of the console, Opens new tab inside the console. HYPERLINK("javascript:if(typeof(srcUp)=='function') {srcUp('/" & Id & "?isdtp=vw');}"+ " else {window.location.href='/" & Id & "'}", User__r.FirstName + ' ' + User__r.LastName, "_self" ) Checks if the srcUp exists and if it does, you're in the console.