6 risposte
If u want schedule batch at 1 AM every day, run this code in Execute Anonymous Window in developer console( presee Ctrl + E from Developer console). ScheduleOpportunitySplit sost = new ScheduleOpportunitySplit();
String jobID = System.schedule('Opportunity split job', '0 0 1 * * ?', sost);
0 0 1 * * ? is called
cron expression which tells system the time to run the job.It is in the form of Seconds Minutes Hours Day_of_month Month Day_of_week Optional_year Refer below links for more info on cron expressions,https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htmhttp://docs.embarcadero.com/products/er_studio_portal/erstudioPortal2.0/HTMLHelp/Admin/erstudioportal/erstudioportaladministratorsguide/cron_expression_examplescron_expression_examplecreates_trigger.htm