Subversion Repositories SmartDukaan

Rev

Rev 36003 | Rev 36065 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23756 amit.gupta 1
package com.smartdukaan.cron.scheduled;
2
 
30049 amit.gupta 3
import com.smartdukaan.cron.migrations.RunOnceTasks;
4
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
5
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
34948 ranu 6
import com.smartdukaan.cron.scheduled.ambreports.AbmReportSender;
30049 amit.gupta 7
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
32832 amit.gupta 8
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
32907 amit.gupta 9
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
34443 vikas.jang 10
import com.spice.profitmandi.common.model.ProfitMandiConstants;
34241 tejus.loha 11
import com.spice.profitmandi.dao.service.PurSaleService;
23756 amit.gupta 12
import org.apache.logging.log4j.LogManager;
13
import org.apache.logging.log4j.Logger;
14
import org.springframework.beans.factory.annotation.Autowired;
15
import org.springframework.scheduling.annotation.Scheduled;
16
import org.springframework.stereotype.Component;
17
 
30049 amit.gupta 18
import java.time.LocalDate;
19
import java.time.LocalDateTime;
34756 amit.gupta 20
import java.time.LocalTime;
30049 amit.gupta 21
import java.util.Date;
22
import java.util.LinkedHashMap;
23756 amit.gupta 23
 
24
@Component
30887 amit.gupta 25
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
23756 amit.gupta 26
public class ScheduledSkeleton {
23794 govind 27
 
32048 tejbeer 28
    private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
23756 amit.gupta 29
 
32048 tejbeer 30
    @Autowired
31
    private ScheduledTasks scheduledTasks;
28205 tejbeer 32
 
32048 tejbeer 33
    @Autowired
34321 ranu 34
    private ScheduledTasksTest scheduledTasksTest;
35
 
36
    @Autowired
34948 ranu 37
    private AbmReportSender abmReportSender;
38
 
39
    @Autowired
32048 tejbeer 40
    private LeadSyncRunner leadSyncRunner;
24841 govind 41
 
32048 tejbeer 42
    @Autowired
43
    private Reconciliation reconciliation;
25822 amit.gupta 44
 
32048 tejbeer 45
    @Autowired
46
    private RunOnceTasks runOnceTasks;
23756 amit.gupta 47
 
32048 tejbeer 48
    @Autowired
49
    NagiosMonitorTasks nagiosMonitorTasks;
24188 govind 50
 
32048 tejbeer 51
    @Autowired
52
    private TicketRelatedScheduledTask ticketRelatedScheduledTask;
24841 govind 53
 
32048 tejbeer 54
    @Autowired
55
    private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
28921 tejbeer 56
 
32048 tejbeer 57
    @Autowired
58
    private WriteToPropertiesFile writeToPropertiesFile;
29673 manish 59
 
32048 tejbeer 60
    String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
29757 tejbeer 61
 
32048 tejbeer 62
    @Scheduled(cron = "0 0 2 * * *")
63
    public void processDailySchemes() throws Exception {
29757 tejbeer 64
 
32048 tejbeer 65
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
66
        propertiesDetails.put("processDailySchemes", "0");
29673 manish 67
 
32048 tejbeer 68
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
69
        int maxMinusDays = 5;
70
        int currentDayOfMonth = LocalDate.now().getDayOfMonth();
71
        int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
72
        if (minusDays > 0) {
73
            scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
74
        }
75
        propertiesDetails.put("processDailySchemes", "1");
76
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 77
 
32048 tejbeer 78
    }
24841 govind 79
 
32048 tejbeer 80
    @Scheduled(cron = "0 15 0 * * *")
81
    public void runOnceTasks() throws Exception {
29757 tejbeer 82
 
32048 tejbeer 83
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
84
        propertiesDetails.put("runOnceTasks", "0");
29673 manish 85
 
32048 tejbeer 86
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 87
 
32048 tejbeer 88
        scheduledTasks.reconcileRecharge();
29757 tejbeer 89
 
32048 tejbeer 90
        propertiesDetails.put("runOnceTasks", "1");
91
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
92
    }
25822 amit.gupta 93
 
32048 tejbeer 94
    /*
95
     * @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
96
     * throws Exception { runOnceTasks.mailDashboardScreenshots(); }
97
     */
25721 tejbeer 98
 
32048 tejbeer 99
    @Scheduled(cron = "0 05 0 1,16 * ?")
100
    public void processRechargeCashback() throws Throwable {
29673 manish 101
 
32048 tejbeer 102
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
103
        propertiesDetails.put("processRechargeCashback", "0");
29673 manish 104
 
32048 tejbeer 105
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
106
        scheduledTasks.processRechargeCashback();
29673 manish 107
 
32048 tejbeer 108
        propertiesDetails.put("processRechargeCashback", "1");
109
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 110
 
32048 tejbeer 111
    }
23794 govind 112
 
32048 tejbeer 113
    @Scheduled(cron = "0 0 6 * * *")
114
    public void sendPartnerInvestmentDetails() throws Exception {
115
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
116
        propertiesDetails.put("sendPartnerInvestmentDetails", "0");
117
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
118
        scheduledTasks.sendPartnerInvestmentDetails();
119
        long secs = (new Date().getTime()) / 1000;
120
        log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
29757 tejbeer 121
 
32048 tejbeer 122
        propertiesDetails.put("investmentDate", Long.toString(secs));
123
        propertiesDetails.put("sendPartnerInvestmentDetails", "1");
124
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 125
 
32048 tejbeer 126
    }
28921 tejbeer 127
 
34725 ranu 128
    @Scheduled(cron = "0 30 6 * * *")
34648 ranu 129
    public void generateBiReport() throws Exception {
130
        scheduledTasksTest.generateBiReport();
131
    }
34939 ranu 132
    @Scheduled(cron = "0 30 4 * * *")
133
    public void createFofoSmartCartSuggestion() throws Exception {
134
        scheduledTasksTest.createFofoSmartCartSuggestion();
135
    }
35980 amit 136
    /*@Scheduled(cron = "0 0 6,22 * * *")
34948 ranu 137
    public void sendAbmSmartCartReport() throws Exception {
138
        abmReportSender.sendAbmSmartCartReport();
35980 amit 139
    }*/
34648 ranu 140
 
32048 tejbeer 141
    @Scheduled(cron = "0 0 10,15,17 * * *")
142
    public void sendIndentTertiaryReport() throws Exception {
29757 tejbeer 143
 
32048 tejbeer 144
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
145
        propertiesDetails.put("sendIndentTertiaryReport", "0");
29673 manish 146
 
32048 tejbeer 147
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 148
 
32048 tejbeer 149
        scheduledTasks.sendIndentTertiary();
29757 tejbeer 150
 
32048 tejbeer 151
        propertiesDetails.put("sendIndentTertiaryReport", "1");
152
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 153
 
32048 tejbeer 154
    }
28921 tejbeer 155
 
32048 tejbeer 156
    @Scheduled(cron = "0 0 6 * * *")
157
    public void checkPartnerActiveStoreByStatus() throws Exception {
158
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
159
        propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
29673 manish 160
 
32048 tejbeer 161
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 162
 
32048 tejbeer 163
        scheduledTasks.checkPartnerActiveStore();
164
        propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
165
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 166
 
32048 tejbeer 167
    }
26790 tejbeer 168
 
32048 tejbeer 169
    // @Scheduled(cron = "0 0 8 * * *")
170
    public void sendStockAgeingReport() throws Throwable {
29757 tejbeer 171
 
32048 tejbeer 172
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
173
        propertiesDetails.put("sendStockAgeingReport", "0");
29673 manish 174
 
32048 tejbeer 175
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 176
 
32048 tejbeer 177
        scheduledTasks.sendAgeingReport();
29757 tejbeer 178
 
32048 tejbeer 179
        propertiesDetails.put("sendStockAgeingReport", "1");
180
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 181
 
32048 tejbeer 182
    }
24131 govind 183
 
32048 tejbeer 184
    @Scheduled(cron = "0 0 11 * * *")
185
    public void escalateTicket() throws Exception {
186
        log.info("escalate ticket");
187
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
188
        propertiesDetails.put("escalateTicket", "0");
189
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
190
        ticketRelatedScheduledTask.escalateTicket();
29757 tejbeer 191
 
32048 tejbeer 192
        propertiesDetails.put("escalateTicket", "1");
193
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 194
 
32048 tejbeer 195
    }
24841 govind 196
 
32048 tejbeer 197
    @Scheduled(cron = "0 0 11 * * *")
198
    public void alertTicketToUser() throws Exception {
199
        log.info("alert for ticket");
200
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
201
        propertiesDetails.put("alertTicketToUser", "0");
202
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 203
 
32048 tejbeer 204
        ticketRelatedScheduledTask.alertforTicket();
205
        propertiesDetails.put("alertTicketToUser", "1");
206
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 207
 
32048 tejbeer 208
    }
24841 govind 209
 
34904 ranu 210
    //@Scheduled(cron = "0 0 14,18,23 ? * *")
32048 tejbeer 211
    public void dailySaleNotification() throws Exception {
212
        log.info("daily send Notification");
213
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
214
        propertiesDetails.put("dailySaleNotification", "0");
215
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 216
 
32048 tejbeer 217
        scheduledTasks.sendDailySalesNotificationToPartner(null);
29757 tejbeer 218
 
32048 tejbeer 219
        propertiesDetails.put("dailySaleNotification", "1");
220
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 221
 
32048 tejbeer 222
    }
24841 govind 223
 
32048 tejbeer 224
    /*
225
     * @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
226
     * Exception { reconciliation.dailyReconciliation(); }
227
     */
28205 tejbeer 228
 
32048 tejbeer 229
    @Scheduled(cron = "0 0 1 * * *")
230
    public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
231
        log.info("selectFinServiceFollowUpDateByCurrDate");
232
        scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
30049 amit.gupta 233
 
32048 tejbeer 234
    }
30049 amit.gupta 235
 
32165 amit.gupta 236
    @Scheduled(cron = "0 0 4 * * *")
32048 tejbeer 237
    public void processActivation() throws Exception {
29757 tejbeer 238
 
32048 tejbeer 239
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
240
        propertiesDetails.put("processActivation", "0");
241
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 242
 
32048 tejbeer 243
        scheduledTasks.processActivation();
29757 tejbeer 244
 
32048 tejbeer 245
        propertiesDetails.put("processActivation", "1");
246
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 247
 
32048 tejbeer 248
    }
25721 tejbeer 249
 
32048 tejbeer 250
    // TODO: Change it back to first of every month
251
    // @Scheduled(cron = "0 0 1 1 * *")
252
    @Scheduled(cron = "0 0 1 2 * *")
253
    public void rollOutUpgardedMargins() throws Exception {
35522 amit 254
        scheduledTasks.rollOutUpgardedMarginsNextMonth(null);
30788 amit.gupta 255
 
32048 tejbeer 256
    }
30788 amit.gupta 257
 
34241 tejus.loha 258
    @Scheduled(fixedDelay = 60 * 1000)
32048 tejbeer 259
    public void sendNotification() throws Throwable {
29757 tejbeer 260
 
32048 tejbeer 261
        log.info("send Notification");
262
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
263
        propertiesDetails.put("sendNotification", "0");
264
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 265
 
32048 tejbeer 266
        scheduledTasks.sendNotification();
267
        propertiesDetails.put("sendNotification", "1");
268
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
269
        log.info("send Notification Done");
29673 manish 270
 
32048 tejbeer 271
    }
28205 tejbeer 272
 
34669 amit.gupta 273
    //@Scheduled(cron = "0 */15 * * * *")
32048 tejbeer 274
    public void checkRazorPayPaymentStatus() throws Throwable {
29757 tejbeer 275
 
32048 tejbeer 276
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
277
        propertiesDetails.put("checkRazorPayPaymentStatus", "0");
278
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 279
 
32048 tejbeer 280
        scheduledTasks.checkRazorPayPaymentStatus();
281
        propertiesDetails.put("checkRazorPayPaymentStatus", "1");
282
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 283
 
32048 tejbeer 284
    }
28377 tejbeer 285
 
34241 tejus.loha 286
    @Scheduled(fixedDelay = 2 * 1000)
33426 amit.gupta 287
    //@Scheduled(cron = "0 5 23 * * *")
32048 tejbeer 288
    public void updateIrnsToInvoices() throws Throwable {
289
        runOnceTasks.updateIrnsToInvoices();
290
    }
31612 tejbeer 291
 
32048 tejbeer 292
    // No longer needed
293
    // @Scheduled(cron = "0 */10 * * * *")
294
    public void attachToffeeInvoices() throws Throwable {
29757 tejbeer 295
 
32048 tejbeer 296
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
297
        propertiesDetails.put("attachToffeeInvoices", "0");
298
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 299
 
32048 tejbeer 300
        scheduledTasks.attachToffeeInvoices();
29757 tejbeer 301
 
32048 tejbeer 302
        propertiesDetails.put("attachToffeeInvoices", "1");
303
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 304
 
32048 tejbeer 305
    }
24841 govind 306
 
35568 amit 307
    // REMOVED: ticketClosed() scheduler - now handled by TicketRelatedScheduledTask.autoCloseResolvedTickets()
308
    // which uses 8 working days instead of 7 calendar days and runs as part of processAllTicketTasks()
26283 tejbeer 309
 
32048 tejbeer 310
    @Scheduled(cron = "0 0 8 * * *")
311
    public void checkfocusedModelInPartnerStock() throws Throwable {
312
        log.info("startTime" + LocalDateTime.now());
29757 tejbeer 313
 
32048 tejbeer 314
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
315
        propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
316
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 317
 
32048 tejbeer 318
        scheduledTasks.checkfocusedModelInPartnerStock();
319
        propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
320
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
25721 tejbeer 321
 
32048 tejbeer 322
        log.info("endTime" + LocalDateTime.now());
323
    }
28205 tejbeer 324
 
32048 tejbeer 325
    @Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
326
    public void notifyLead() throws Throwable {
29757 tejbeer 327
 
32048 tejbeer 328
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
329
        propertiesDetails.put("notifyLead", "0");
330
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 331
 
32048 tejbeer 332
        scheduledTasks.notifyLead();
29757 tejbeer 333
 
32048 tejbeer 334
        propertiesDetails.put("notifyLead", "1");
335
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 336
 
32048 tejbeer 337
        // scheduledTasks.notifyVisits();
338
    }
25721 tejbeer 339
 
32048 tejbeer 340
    // No longer scheduled
341
    // @Scheduled(cron = "0 0 1 * * *")
342
    public void fetchImeiActivation() throws Throwable {
343
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
344
        propertiesDetails.put("fetchImeiActivation", "0");
345
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 346
 
32048 tejbeer 347
        runOnceTasks.fetchImeiActivation(0);
29757 tejbeer 348
 
32048 tejbeer 349
        propertiesDetails.put("fetchImeiActivation", "1");
350
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 351
 
32048 tejbeer 352
    }
26790 tejbeer 353
 
32411 amit.gupta 354
    @Scheduled(cron = "0 0 7 * * *")
355
    //Send all lead owners the report for scheduled followups missed
356
    public void sendUnscheduledFollowUpMail() throws Exception {
357
        scheduledTasks.sendUnscheduledFollowUpMail();
358
    }
359
 
32048 tejbeer 360
    @Scheduled(cron = "0 0 1 * * *")
361
    public void checkValidateReferral() throws Throwable {
362
        log.info("startTime" + LocalDateTime.now());
363
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
364
        propertiesDetails.put("checkValidateReferral", "0");
365
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 366
 
32048 tejbeer 367
        scheduledTasks.checkValidateReferral();
29757 tejbeer 368
 
32048 tejbeer 369
        propertiesDetails.put("checkValidateReferral", "1");
370
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26790 tejbeer 371
 
32048 tejbeer 372
        log.info("endTime" + LocalDateTime.now());
373
    }
26790 tejbeer 374
 
32048 tejbeer 375
    // @Scheduled(cron = "0 0 8 * * *")
376
    public void partnerProblemAlert() throws Throwable {
377
        log.info("startTime" + LocalDateTime.now());
378
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
379
        propertiesDetails.put("partnerProblemAlert", "0");
380
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 381
 
32048 tejbeer 382
        scheduledTasks.partnerProblemAlert();
383
        propertiesDetails.put("partnerProblemAlert", "1");
384
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 385
 
32048 tejbeer 386
        log.info("endTime" + LocalDateTime.now());
387
    }
28921 tejbeer 388
 
32048 tejbeer 389
    /*
390
     * @Scheduled(cron = "0 30 10 * * MON-SAT") public void
391
     * sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
392
     * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
393
     * LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
394
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
395
     * nagiosCronPropertiesFile);
32507 amit.gupta 396
     *
32048 tejbeer 397
     * scheduledTasks.sendAttendanceMorningAlert();
398
     * propertiesDetails.put("sendMorningAttendanceAlert", "1");
399
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
400
     * nagiosCronPropertiesFile);
32507 amit.gupta 401
     *
32048 tejbeer 402
     * log.info("endTime" + LocalDateTime.now()); }
32507 amit.gupta 403
     *
32048 tejbeer 404
     * @Scheduled(cron = "0 30 20 * * MON-SAT") public void
405
     * sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
406
     * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
407
     * LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
408
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
409
     * nagiosCronPropertiesFile);
32507 amit.gupta 410
     *
32048 tejbeer 411
     * scheduledTasks.sendAttendanceEveningAlert();
412
     * propertiesDetails.put("sendEveningAttendanceAlert", "1");
413
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
414
     * nagiosCronPropertiesFile);
32507 amit.gupta 415
     *
32048 tejbeer 416
     * log.info("endTime" + LocalDateTime.now()); }
417
     */
29673 manish 418
 
35109 ranu 419
    @Scheduled(cron = "0 0 10 * * *")
32048 tejbeer 420
    public void onboardingEventDelays() throws Throwable {
421
        log.info("startTime" + LocalDateTime.now());
29757 tejbeer 422
 
32048 tejbeer 423
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
424
        propertiesDetails.put("onboardingEventDelays", "0");
425
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 426
 
32048 tejbeer 427
        onBoardingRelatedSchelduleTask.onboardingEventDelays();
29757 tejbeer 428
 
32048 tejbeer 429
        propertiesDetails.put("onboardingEventDelays", "1");
430
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 431
 
32048 tejbeer 432
        log.info("endTime" + LocalDateTime.now());
433
    }
28921 tejbeer 434
 
36003 aman 435
    @Scheduled(cron = "0 0 9 * * ?")
436
    public void sendDelayAlertEmail() {
437
        log.info("sendDelayAlertEmail startTime " + LocalDateTime.now());
438
        onBoardingRelatedSchelduleTask.sendDelayAlertEmail();
439
        log.info("sendDelayAlertEmail endTime " + LocalDateTime.now());
440
    }
441
 
32048 tejbeer 442
    @Scheduled(cron = "0 0 8 * * *")
443
    public void brandingAlert() throws Throwable {
444
        log.info("startTime" + LocalDateTime.now());
445
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
446
        propertiesDetails.put("brandingAlert", "0");
447
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 448
 
32048 tejbeer 449
        onBoardingRelatedSchelduleTask.brandingAlert();
450
        propertiesDetails.put("brandingAlert", "1");
451
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 452
 
32048 tejbeer 453
        log.info("endTime" + LocalDateTime.now());
454
    }
28921 tejbeer 455
 
33859 tejus.loha 456
//    @Scheduled(cron = "0 0 8 * * *")
457
//    public void advancePaymentPendingAlert() throws Throwable {
458
//        log.info("startTime" + LocalDateTime.now());
459
//
460
//        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
461
//        propertiesDetails.put("advancePaymentPendingAlert", "0");
462
//        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
463
//
464
//        onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
465
//        propertiesDetails.put("advancePaymentPendingAlert", "1");
466
//        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
467
//
468
//        log.info("endTime" + LocalDateTime.now());
469
//    }
29757 tejbeer 470
 
32048 tejbeer 471
    @Scheduled(cron = "0 0 8 * * *")
472
    public void fullPaymentPendingAlert() throws Throwable {
473
        log.info("startTime" + LocalDateTime.now());
29757 tejbeer 474
 
32048 tejbeer 475
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
476
        propertiesDetails.put("fullPaymentPendingAlert", "0");
477
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 478
 
32048 tejbeer 479
        onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
29757 tejbeer 480
 
32048 tejbeer 481
        propertiesDetails.put("fullPaymentPendingAlert", "1");
482
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 483
 
32048 tejbeer 484
        log.info("endTime" + LocalDateTime.now());
485
    }
28921 tejbeer 486
 
33859 tejus.loha 487
//    @Scheduled(cron = "0 0 9 * * *")
488
//    public void advancePaymentPendinglegalAlert() throws Throwable {
489
//        log.info("startTime" + LocalDateTime.now());
490
//        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
491
//        propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
492
//        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
493
//
494
////        onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
495
//
496
//        propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
497
//        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
498
//
499
//        log.info("endTime" + LocalDateTime.now());
500
//    }
29673 manish 501
 
32048 tejbeer 502
    @Scheduled(cron = "0 */5 * * * *")
503
    public void onBoardingCompleteEventEmail() throws Throwable {
504
        log.info("startTime" + LocalDateTime.now());
505
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
506
        propertiesDetails.put("onBoardingCompleteEventEmail", "0");
507
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 508
 
32048 tejbeer 509
        onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
510
        propertiesDetails.put("onBoardingCompleteEventEmail", "1");
511
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 512
 
32048 tejbeer 513
        log.info("endTime" + LocalDateTime.now());
514
    }
29040 tejbeer 515
 
32048 tejbeer 516
    @Scheduled(cron = "0 */5 * * * *")
517
    public void updateSaholicCISTable() throws Throwable {
518
        log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
519
        runOnceTasks.updateSaholicCISTable();
520
        log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
521
    }
30667 amit.gupta 522
 
34241 tejus.loha 523
    @Autowired
524
    PurSaleService purSaleService;
525
 
35133 ranu 526
    @Scheduled(cron = "0 0 6,22 * * ?")
34241 tejus.loha 527
    public void send10DaysEgedStockReport() throws Throwable {
34275 tejus.loha 528
        log.info("moreThen10DaysEgedStockReport startTime" + LocalDateTime.now());
529
        scheduledTasks.send10OrMoreOlderStockReport();
530
        log.info("moreThen10DaysEgedStockReport endTime" + LocalDateTime.now());
34241 tejus.loha 531
    }
532
 
35616 amit 533
    @Scheduled(fixedDelay = 5 * 60 * 1000)
32048 tejbeer 534
    public void fetchPartnerStat() throws Throwable {
535
        scheduledTasks.fetchParnterStats();
536
    }
30390 amit.gupta 537
 
33859 tejus.loha 538
//    @Scheduled(cron = "0 0 9 * * *")
539
//    public void storeTimelinePromoterPending() throws Throwable {
540
//        log.info("startTime" + LocalDateTime.now());
541
//
542
//        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
543
//        propertiesDetails.put("storeTimelinePromoterPending", "0");
544
//        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
545
//
546
////        onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
547
//        propertiesDetails.put("storeTimelinePromoterPending", "1");
548
//        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
549
//
550
//        log.info("endTime" + LocalDateTime.now());
551
//    }
29757 tejbeer 552
 
34669 amit.gupta 553
    //@Scheduled(cron = "0 0 23 * * *")
32214 jai.hind 554
    public void checkItelImeiActivationNew() throws Throwable {
555
        log.info("startTime" + LocalDate.now());
556
 
557
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
558
        propertiesDetails.put("checkItelImeiActivationNew", "0");
559
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
560
        log.info("startTimecheckItelImeiActivation" + LocalDate.now());
561
        scheduledTasks.checkItelImeiActivationNew(LocalDate.now(), 90);
562
        long secs = (new Date().getTime()) / 1000;
563
        log.info("endTimecheckItelImeiActivation" + LocalDate.now());
564
        propertiesDetails.put("checkItelImeiActivationNew", "1");
565
        propertiesDetails.put("itelDate", Long.toString(secs));
566
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
567
 
568
    }
569
 
570
 
32048 tejbeer 571
    @Scheduled(fixedDelay = 60 * 1000)
572
    public void vivoImeiActivation() throws Throwable {
573
        log.info("startTimevivoImeiActivation" + LocalDateTime.now());
29757 tejbeer 574
 
32048 tejbeer 575
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
576
        propertiesDetails.put("vivoImeiActivation", "0");
577
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 578
 
32048 tejbeer 579
        scheduledTasks.checkImeiActivation();
580
        long secs = (new Date().getTime()) / 1000;
581
        log.info("endTimevivoImeiActivation" + LocalDateTime.now());
582
        propertiesDetails.put("vivoImeiActivation", "1");
29757 tejbeer 583
 
32048 tejbeer 584
        propertiesDetails.put("vivoDate", Long.toString(secs));
585
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 586
 
32048 tejbeer 587
    }
29255 tejbeer 588
 
32048 tejbeer 589
    @Scheduled(cron = "0 0 8 * * *")
590
    public void reviewUncontactablePartner() throws Throwable {
591
        log.info("startTime" + LocalDateTime.now());
30421 tejbeer 592
 
32048 tejbeer 593
        scheduledTasks.reviewUncontactablePartner();
30421 tejbeer 594
 
32048 tejbeer 595
    }
30421 tejbeer 596
 
33928 ranu 597
    @Scheduled(cron = "0 0 7 * * *")
598
    public void setMovementWiseRbmTodayTargets() throws Throwable {
34669 amit.gupta 599
        log.info("today targets startTime {}", LocalDateTime.now());
33928 ranu 600
 
601
        scheduledTasks.persistRbmTodayTargets();
602
 
603
    }
604
 
33986 ranu 605
    @Scheduled(cron = "0 0 21 * * *")
606
    public void setMovementWiseRbmTodayAchievements() throws Throwable {
34669 amit.gupta 607
        log.info("today achievement startTime {}", LocalDateTime.now());
33986 ranu 608
 
609
        scheduledTasks.persistRbmTodayAchievements();
610
 
611
    }
612
 
33078 ranu 613
    @Scheduled(cron = "0 0 8 * * *")
614
    public void reviewNonSdBuyingBrand() throws Throwable {
615
        log.info("startTime" + LocalDateTime.now());
616
 
617
        scheduledTasks.reviewNonSdBuyingBrand();
618
 
619
    }
620
 
32048 tejbeer 621
    @Autowired
622
    private StandAlone standAlone;
30352 amit.gupta 623
 
32832 amit.gupta 624
    @Autowired
625
    OrderTrackingService orderTrackingService;
626
 
32147 amit.gupta 627
    @Scheduled(fixedDelay = 60 * 1000)
32048 tejbeer 628
    public void oppo() throws Throwable {
629
        standAlone.checkOppoImeiStatus();
630
    }
30352 amit.gupta 631
 
34421 amit.gupta 632
    @Scheduled(fixedDelay = 60 * 1000)
633
    public void realme() throws Throwable {
634
        standAlone.checkRealmeImeiStatus();
635
    }
636
 
32801 amit.gupta 637
    @Scheduled(cron = "0 0 * * * *")
32048 tejbeer 638
    public void markBlueDartOrderDelivered() throws Throwable {
639
        log.info("startTime" + LocalDateTime.now());
32832 amit.gupta 640
        orderTrackingService.markBlueDartOrderDelivered();
32048 tejbeer 641
        log.info("endTime" + LocalDateTime.now());
642
    }
31117 tejbeer 643
 
32881 amit.gupta 644
    @Scheduled(cron = "0 15 * * * *")
32048 tejbeer 645
    public void markDelhiveryOrderDelivered() throws Throwable {
646
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
647
        propertiesDetails.put("markDelhiveryOrderDelivered", "0");
648
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 649
 
32048 tejbeer 650
        log.info("startTime" + LocalDateTime.now());
32832 amit.gupta 651
        orderTrackingService.markDelhiveryOrderDelivered();
32048 tejbeer 652
        propertiesDetails.put("markDelhiveryOrderDelivered", "1");
653
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29673 manish 654
 
32048 tejbeer 655
        log.info("endTime" + LocalDateTime.now());
656
    }
29308 tejbeer 657
 
32048 tejbeer 658
    @Scheduled(cron = "0 0 4 * * *")
659
    public void processPriceDrop() throws Throwable {
660
        scheduledTasks.processPriceDrop();
661
    }
30637 amit.gupta 662
 
32048 tejbeer 663
    @Scheduled(cron = "0 0 0 * * *")
664
    public void calculateInterestAccured() throws Throwable {
34710 amit.gupta 665
        scheduledTasks.loanSettlement();
32048 tejbeer 666
        scheduledTasks.calculateInterestAccured();
667
    }
30859 tejbeer 668
 
32117 tejbeer 669
    //  @Scheduled(cron = "0 */5 2-22 * * *")
33181 amit.gupta 670
    @Scheduled(fixedDelay = 1 * 60 * 1000)
32531 amit.gupta 671
    //@Scheduled(cron = "0 0 23 * * *")
32048 tejbeer 672
    public void loanSettlement() throws Throwable {
34756 amit.gupta 673
        LocalTime now = LocalTime.now();
34767 amit.gupta 674
        LocalTime start = LocalTime.of(9, 0);
34757 amit.gupta 675
        LocalTime end = LocalTime.of(23, 0);
34756 amit.gupta 676
 
677
        if (now.isBefore(start) || now.isAfter(end)) {
34762 amit.gupta 678
            System.out.println("Task skipped during restricted hours: " + now);
679
        } else {
34756 amit.gupta 680
            scheduledTasks.loanSettlement();
681
            System.out.println("Task executed at " + now);
682
        }
32048 tejbeer 683
    }
30859 tejbeer 684
 
32048 tejbeer 685
    @Scheduled(cron = "0 */15 * * * *")
686
    public void ccAvenueSettlement() throws Throwable {
687
        scheduledTasks.settleCCAvePayments();
688
    }
31332 amit.gupta 689
 
32048 tejbeer 690
    @Scheduled(cron = "0 0 6 * * *")
691
    public void dailyLoanAlert() throws Throwable {
692
        scheduledTasks.dailyLoanAlert();
693
    }
30896 amit.gupta 694
 
35106 ranu 695
    @Scheduled(cron = "0 0 11 * * *")
34162 ranu 696
    public void groupHidCatalogsByWeeks() throws Throwable {
697
        scheduledTasks.groupHidCatalogsByWeeks();
698
    }
699
 
34321 ranu 700
    @Scheduled(cron = "0 0 9 * * *")
701
    public void sendFeebackSalesAndRbm() throws Throwable {
702
        scheduledTasksTest.sendRbmFeedbackSummaryEmail();
703
        scheduledTasksTest.sendSalesFeedbackSummaryEmail();
704
    }
705
 
32165 amit.gupta 706
    //Look out for imeis that have activation pending based of sale and mark create new SIO out of them
32048 tejbeer 707
    @Scheduled(cron = "0 0 1 * * *")
708
    public void processActivatedImeisForSchemes() throws Throwable {
709
        scheduledTasks.processActivatedImeisForSchemes();
710
    }
34241 tejus.loha 711
 
33357 amit.gupta 712
    //On every fifth update deductions
33435 amit.gupta 713
    @Scheduled(cron = "0 30 6 5 * ?")
33357 amit.gupta 714
    public void processSidbiDeductions() throws Throwable {
715
        scheduledTasks.processSidbiDeductions();
716
    }
34669 amit.gupta 717
 
34374 amit.gupta 718
    //Dont reset it for now as proposed by TV
719
    //@Scheduled(cron = "0 30 6 4 * ?")
33904 amit.gupta 720
    public void resetHardLimit() throws Throwable {
721
        scheduledTasks.resetHardLimit();
722
    }
723
 
34830 ranu 724
    @Scheduled(cron = "0 0/20 * * * *")
32048 tejbeer 725
    public void updatePartnerLimit() throws Throwable {
726
        scheduledTasks.updatePartnerLimit();
727
    }
30929 tejbeer 728
 
34253 ranu 729
    @Scheduled(cron = "0 0 9,14,18 * * *")
33874 ranu 730
    public void createOpeningStockPartyWise() throws Throwable {
731
        scheduledTasks.createOpeningStockPartyWise();
732
    }
30936 tejbeer 733
 
33874 ranu 734
 
32842 amit.gupta 735
    //Loans due/overdue/default notifications sent to parnters
736
    @Scheduled(cron = "0 0 11 * * *")
32822 ranu 737
    public void sendMailWhatsAppAfterLoanDueDate() throws Throwable {
738
        scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
739
    }
34241 tejus.loha 740
 
32842 amit.gupta 741
    @Scheduled(cron = "0 0 8 * * *")
742
    public void alertForDueDate() throws Throwable {
743
        scheduledTasks.alertForDueDate();
744
    }
32822 ranu 745
 
35133 ranu 746
    @Scheduled(cron = "0 0 4,21 * * *")
32048 tejbeer 747
    public void notifyLoanDueDateCross() throws Throwable {
748
        scheduledTasks.notifyLoanDueDateCross();
749
    }
30936 tejbeer 750
 
35133 ranu 751
    @Scheduled(cron = "0 0 4,21 * * *")
32048 tejbeer 752
    public void notifyDefaultLoans() throws Throwable {
753
        scheduledTasks.notifyDefaultLoans();
754
    }
30936 tejbeer 755
 
34910 ranu 756
   // @Scheduled(cron = "0 0 23 * * *")
32048 tejbeer 757
    public void hygineAlertForInternalTeam() throws Throwable {
758
        scheduledTasks.hygineAlertForInternalTeam();
31206 tejbeer 759
 
32048 tejbeer 760
    }
31206 tejbeer 761
 
32048 tejbeer 762
    @Scheduled(cron = "0 0 23 * * *")
763
    public void hygineAlertForPartner() throws Throwable {
764
        scheduledTasks.hygineAlertForPartner();
31206 tejbeer 765
 
32048 tejbeer 766
    }
31206 tejbeer 767
 
32048 tejbeer 768
    @Scheduled(cron = "0 0 0 * * MON")
769
    public void monthlyTargetForPartner() throws Throwable {
770
        scheduledTasks.monthlyTargetForPartner();
31249 tejbeer 771
 
32048 tejbeer 772
    }
31249 tejbeer 773
 
32048 tejbeer 774
    @Scheduled(cron = "0 0 0 * * MON")
775
    public void monthlyTargetForInternalTeam() throws Throwable {
776
        scheduledTasks.monthlyTargetForInternalTeam();
31249 tejbeer 777
 
32048 tejbeer 778
    }
31612 tejbeer 779
 
32048 tejbeer 780
    @Scheduled(cron = "0 0 6 * * *")
781
    public void sendSamsungRebilling() throws Throwable {
782
        scheduledTasks.sendMailForSamsungRebilling();
783
    }
31931 amit.gupta 784
 
32048 tejbeer 785
    @Scheduled(cron = "0 10 8 * * *")
786
    public void sendMailForAgeingAlert() throws Throwable {
787
        scheduledTasks.sendMailForAgeingAlert();
788
    }
789
 
790
 
791
    @Scheduled(cron = "0 0 8 * * *")
792
    public void sendFilteredRetailerPerformance() throws Throwable {
793
        scheduledTasks.sendFilteredRetailerPerformance();
794
    }
32690 amit.gupta 795
 
33444 ranu 796
    @Scheduled(cron = "0 0 0 * * MON")
797
    public void findAllLiveDemoBrandItemsByBillingDate() throws Throwable {
798
        scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
799
    }
34241 tejus.loha 800
 
33464 ranu 801
    @Scheduled(cron = "0 10 6 * * *")
802
    public void findTodayPocoBillingItems() throws Throwable {
803
        scheduledTasks.findTodayPocoBillingItems();
804
    }
32690 amit.gupta 805
 
33444 ranu 806
 
32690 amit.gupta 807
    @Scheduled(cron = "0 0 12 * * *")
808
    public void rejectPriceDropsOfApprovedImeis() throws Throwable {
809
        scheduledTasks.rejectPriceDropsOfApprovedImeis();
810
    }
32907 amit.gupta 811
 
812
    @Autowired
813
    POScheduler poScheduler;
34241 tejus.loha 814
 
32907 amit.gupta 815
    @Scheduled(cron = "0 0 1 * * *")
33643 amit.gupta 816
    public void autoClosePO() {
32907 amit.gupta 817
        poScheduler.autoClosePurchaseOrders();
818
    }
32048 tejbeer 819
    /*
820
     * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
821
     * throws Throwable { log.info("startTime" + LocalDateTime.now());
822
     * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
823
     * log.info("endTime" + LocalDateTime.now()); }
824
     */
34443 vikas.jang 825
 
34547 vikas.jang 826
    @Scheduled(cron = "0 50 23 * * *")
34443 vikas.jang 827
    public void bidConfirmation() throws Throwable {
34547 vikas.jang 828
        log.info("running bid cron at 23:50PM");
34443 vikas.jang 829
        runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.YESTERDAY);
830
    }
831
 
34547 vikas.jang 832
    @Scheduled(cron = "0 0 19 * * *")
34443 vikas.jang 833
    public void processLiquidationBids() throws Throwable {
34547 vikas.jang 834
        log.info("running bid cron at 07:00PM");
34443 vikas.jang 835
        runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
836
    }
837
 
34547 vikas.jang 838
    @Scheduled(cron = "0 30 21 * * *")
34443 vikas.jang 839
    public void bidPurchaseOrder() throws Throwable {
34547 vikas.jang 840
        log.info("running bid cron at 09:30PM");
34443 vikas.jang 841
        runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
842
    }
34547 vikas.jang 843
 
34669 amit.gupta 844
    /*@Scheduled(cron = "0 0 12 * * *")
845
    public void processCashDiscount() throws Throwable {
846
        scheduledTasks.processCashDiscount();
847
    }*/
848
 
849
 
34563 vikas.jang 850
    @Scheduled(cron = "0 0 9,17 * * *")
34547 vikas.jang 851
    public void bidConsolidatedMessage() throws Throwable {
852
        log.info("Running bid cron at 09:00 AM or 05:00 PM");
853
        runOnceTasks.consolidatedBiddingMessage();
34563 vikas.jang 854
    }
34770 vikas.jang 855
 
856
    @Scheduled(cron = "0 0 8 * * *")
34836 vikas 857
    public void yesterdayTrackingReport() throws Throwable {
858
        log.info("Running yesterday employee tracking cron at 08:00 AM");
859
        runOnceTasks.yesterdayTrackingReport();
34770 vikas.jang 860
    }
34836 vikas 861
 
35178 amit 862
    @Scheduled(cron = "0 10 8 * * *")
35177 amit 863
    public void partnerCreditExposureReport() throws Throwable {
864
        log.info("Running yesterday employee tracking cron at 08:00 AM");
865
        runOnceTasks.sendCreditExposureReport();
866
    }
867
 
34836 vikas 868
    @Scheduled(cron = "0 0 21,16 * * *")
869
    public void dailyTrackingReport() throws Throwable {
870
        log.info("Running daily employee tracking cron at 09:00 PM and 04:00 PM");
871
        runOnceTasks.dailyTrackingReport();
872
    }
35105 vikas 873
 
34792 amit.gupta 874
    @Scheduled(cron = "0 0 0 1 1,4,7,10 *")
875
    public void sendUpdateMobileBrandMarketShareQuaterlyMail() throws Throwable {
34791 aman.kumar 876
        log.info("Running Marketshare update remined quaterly");
877
        scheduledTasks.sendUpdateMobileBrandMarketShareQuaterlyMail();
878
    }
35105 vikas 879
 
880
    @Scheduled(cron = "0 0 * * * *")
881
    public void checkRewardsEligibility() throws Throwable {
882
        log.info("Running Rewards Disburse daily");
883
        runOnceTasks.checkRewardsEligibility();
884
    }
35326 amit 885
 
886
    @Scheduled(cron="0 0 20 * * *")
887
    public void sendTrialExpiry() {
888
        scheduledTasks.sendTrialExpiry();
889
    }
35666 vikas 890
 
891
    @Scheduled(cron = "0 0 0 * * *")
892
    public void fetchOffersByItem() {
893
        scheduledTasks.cachePinelabsOffers();
894
    }
35788 vikas 895
 
896
    @Scheduled(cron = "0 0 0 * * *")
897
    public void syncProductsToShopify() throws Exception {
36058 ranu 898
        scheduledTasks.syncProductsToShopifyByWarehouseId(ProfitMandiConstants.WAREHOUSE_NAME_MAP.get("UP-WEST/NOIDA"));
35788 vikas 899
    }
23756 amit.gupta 900
}