global with sharing class ConsumableTargetManageSchedule implements Schedulable{ //每天都从batch2开始跑,跑前一天的数据 global void execute(SchedulableContext sc){ Date today = Date.today().addDays(-1); Id batjobId = Database.executeBatch(new ConsumableTargetManageBatch2(today,today,true), 200); } }