LiJinHuan
2022-03-22 c0515c2f47cafe8da39089d2173e7b41f56e5f3e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
global class BeforeSSOpportunitySchedule 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 BeforeSSOpportunityBatch(), 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 BeforeSSOpportunityBatch(), 100);
        }*/
        //每月1号运行 SWAG-C7ZC4L rentx start
        String todayStr = Datetime.now().format('yyyy/MM/dd');
        // if (todayStr == '2021/10/07') {
        if (todayStr.endsWith('01')) {
            // 20220318 ljh SWAG-CC54R2 update start
            // Id execBTId = Database.executeBatch(new BeforeSSOpportunityBatch(), 100);
            Id execBTId = Database.executeBatch(new LogAutoSendBatch('NFM010',true), 1);
            // 20220318 ljh SWAG-CC54R2 update end
        }
        //每月1号运行 SWAG-C7ZC4L rentx end
        
  }
}