buli
2022-04-15 900c50a247705d6fe8833e84d31b5d51616b7c26
force-app/main/default/classes/SSOpportunitySchedule.cls
@@ -1,29 +1,5 @@
global class SSOpportunitySchedule implements Schedulable {
    global void execute(SchedulableContext SC) {
        /*Date toDate = Date.today();
        Date yesterDate = toDate.addDays(-1);
        Date mon1stDate = Date.newInstance(toDate.year(), toDate.month(), 1);
        Integer workdays = UpdateUserTextColBatch.getOlympusWorkDayCount(mon1stDate, toDate);
        Integer workdays1 = UpdateUserTextColBatch.getOlympusWorkDayCount(mon1stDate, yesterDate);
        System.debug('mon1stDate=' + mon1stDate);
        System.debug('today=' + toDate);
        System.debug('workdays=' + workdays);
        Integer SSBacth_Execute_Day = Integer.valueOf(System.Label.SSBacth_Execute_Day);
        if (workdays1 != SSBacth_Execute_Day && workdays == SSBacth_Execute_Day) {
            Id execBTId = Database.executeBatch(new SSOpportunityBatch(null), 100);
        }*/
        //7号运行8号不运行  ==直接写死 2021年10月7号执行 update by rentx
        /*String todayStr = Datetime.now().format('yyyy/MM/dd');
        if (todayStr == '2021/10/07') {
            Id execBTId = Database.executeBatch(new SSOpportunityBatch(null), 100);
        }*/
        //每月1号运行 SWAG-C7ZC4L rentx start
        String todayStr = Datetime.now().format('yyyy/MM/dd');
        if (todayStr.endsWith('01')) {
            Id execBTId = Database.executeBatch(new SSOpportunityBatch(null), 100);
        }
        //每月1号运行 SWAG-C7ZC4L rentx end
    }
}