salesforce - Schedule a batch at certain hours -


i made schedulable batch want run @ hours, let's 6, 12 , 18. i'm writting hours in custom setting cs_schedule__c. how can call cs apex , hours?

thanks in advance.

here page outlining how retrieve custom settings in apex depending on if it's list or hierarchy custom settings.

as far scheduling, can in apex if wish, so:

classtoschedule schcls = new classtoschedule(); string sch = '20 30 8 10 2 ?'; string jobid = system.schedule('name of job', sch, schcls); 

the sch string cron expression represent time runs. check out cron expression builder more info. instead of using numbers build string data in custom setting.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -