Subversion Repositories SmartDukaan

Rev

Rev 30788 | Rev 30858 | 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;
6
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
23756 amit.gupta 7
import org.apache.logging.log4j.LogManager;
8
import org.apache.logging.log4j.Logger;
9
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.scheduling.annotation.Scheduled;
11
import org.springframework.stereotype.Component;
12
 
30049 amit.gupta 13
import java.time.LocalDate;
14
import java.time.LocalDateTime;
15
import java.util.Date;
16
import java.util.LinkedHashMap;
23756 amit.gupta 17
 
18
@Component
19
public class ScheduledSkeleton {
23794 govind 20
 
23756 amit.gupta 21
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
22
 
23
	@Autowired
24784 amit.gupta 24
	private ScheduledTasks scheduledTasks;
28205 tejbeer 25
 
27007 amit.gupta 26
	@Autowired
27
	private LeadSyncRunner leadSyncRunner;
24841 govind 28
 
24784 amit.gupta 29
	@Autowired
30
	private Reconciliation reconciliation;
25822 amit.gupta 31
 
25782 amit.gupta 32
	@Autowired
33
	private RunOnceTasks runOnceTasks;
23756 amit.gupta 34
 
35
	@Autowired
36
	NagiosMonitorTasks nagiosMonitorTasks;
24188 govind 37
 
24135 govind 38
	@Autowired
24841 govind 39
	private TicketRelatedScheduledTask ticketRelatedScheduledTask;
40
 
28921 tejbeer 41
	@Autowired
42
	private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
43
 
29673 manish 44
	@Autowired
45
	private WriteToPropertiesFile writeToPropertiesFile;
46
 
29674 manish 47
	String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
29757 tejbeer 48
 
30049 amit.gupta 49
	@Scheduled(cron = "0 0 2 * * *")
24420 amit.gupta 50
	public void processDailySchemes() throws Exception {
29757 tejbeer 51
 
29673 manish 52
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
53
		propertiesDetails.put("processDailySchemes", "0");
54
 
55
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
30049 amit.gupta 56
		int maxMinusDays = 5;
57
		int currentDayOfMonth = LocalDate.now().getDayOfMonth();
58
		int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
59
		if (minusDays > 0) {
60
			scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
61
		}
29673 manish 62
		propertiesDetails.put("processDailySchemes", "1");
63
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
64
 
24420 amit.gupta 65
	}
24841 govind 66
 
23761 amit.gupta 67
	@Scheduled(cron = "0 15 0 * * *")
25782 amit.gupta 68
	public void runOnceTasks() throws Exception {
29757 tejbeer 69
 
29673 manish 70
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
71
		propertiesDetails.put("runOnceTasks", "0");
72
 
73
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
74
 
23756 amit.gupta 75
		scheduledTasks.reconcileRecharge();
29757 tejbeer 76
 
29673 manish 77
		propertiesDetails.put("runOnceTasks", "1");
78
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
23756 amit.gupta 79
	}
25822 amit.gupta 80
 
28205 tejbeer 81
	/*
82
	 * @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
83
	 * throws Exception { runOnceTasks.mailDashboardScreenshots(); }
84
	 */
25721 tejbeer 85
 
23759 amit.gupta 86
	@Scheduled(cron = "0 05 0 1,16 * ?")
23756 amit.gupta 87
	public void processRechargeCashback() throws Throwable {
29673 manish 88
 
89
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
90
		propertiesDetails.put("processRechargeCashback", "0");
91
 
92
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
23756 amit.gupta 93
		scheduledTasks.processRechargeCashback();
29673 manish 94
 
95
		propertiesDetails.put("processRechargeCashback", "1");
96
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
97
 
23756 amit.gupta 98
	}
23794 govind 99
 
27267 amit.gupta 100
	@Scheduled(cron = "0 0 6 * * *")
25563 amit.gupta 101
	public void sendPartnerInvestmentDetails() throws Exception {
29673 manish 102
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
103
		propertiesDetails.put("sendPartnerInvestmentDetails", "0");
104
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
23929 amit.gupta 105
		scheduledTasks.sendPartnerInvestmentDetails();
29757 tejbeer 106
		long secs = (new Date().getTime()) / 1000;
29696 manish 107
		log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
29757 tejbeer 108
 
29695 manish 109
		propertiesDetails.put("investmentDate", Long.toString(secs));
29673 manish 110
		propertiesDetails.put("sendPartnerInvestmentDetails", "1");
111
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
112
 
25893 amit.gupta 113
	}
28921 tejbeer 114
 
28632 amit.gupta 115
	@Scheduled(cron = "0 0 10,15,17 * * *")
116
	public void sendIndentTertiaryReport() throws Exception {
29757 tejbeer 117
 
29673 manish 118
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
119
		propertiesDetails.put("sendIndentTertiaryReport", "0");
120
 
121
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
122
 
28632 amit.gupta 123
		scheduledTasks.sendIndentTertiary();
29757 tejbeer 124
 
29673 manish 125
		propertiesDetails.put("sendIndentTertiaryReport", "1");
126
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
127
 
28632 amit.gupta 128
	}
28921 tejbeer 129
 
28709 amit.gupta 130
	@Scheduled(cron = "0 0 6 * * *")
131
	public void checkPartnerActiveStoreByStatus() throws Exception {
29673 manish 132
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
133
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
134
 
135
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
136
 
28709 amit.gupta 137
		scheduledTasks.checkPartnerActiveStore();
29673 manish 138
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
139
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
140
 
28709 amit.gupta 141
	}
26790 tejbeer 142
 
28921 tejbeer 143
	// @Scheduled(cron = "0 0 8 * * *")
24681 amit.gupta 144
	public void sendStockAgeingReport() throws Throwable {
29757 tejbeer 145
 
29673 manish 146
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
147
		propertiesDetails.put("sendStockAgeingReport", "0");
148
 
149
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
150
 
24681 amit.gupta 151
		scheduledTasks.sendAgeingReport();
29757 tejbeer 152
 
29673 manish 153
		propertiesDetails.put("sendStockAgeingReport", "1");
154
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
155
 
24681 amit.gupta 156
	}
24131 govind 157
 
24890 amit.gupta 158
	@Scheduled(cron = "0 0/30 1-23 * * *")
29673 manish 159
	public void escalateTicket() throws Exception {
24653 govind 160
		log.info("escalate ticket");
29673 manish 161
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
162
		propertiesDetails.put("escalateTicket", "0");
163
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
24841 govind 164
		ticketRelatedScheduledTask.escalateTicket();
29757 tejbeer 165
 
29673 manish 166
		propertiesDetails.put("escalateTicket", "1");
167
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
168
 
24533 govind 169
	}
24841 govind 170
 
171
	@Scheduled(cron = "0 0 11 * * *")
172
	public void alertTicketToUser() throws Exception {
24653 govind 173
		log.info("alert for ticket");
29673 manish 174
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
175
		propertiesDetails.put("alertTicketToUser", "0");
176
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
177
 
24841 govind 178
		ticketRelatedScheduledTask.alertforTicket();
29673 manish 179
		propertiesDetails.put("alertTicketToUser", "1");
180
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
181
 
24653 govind 182
	}
24841 govind 183
 
26943 amit.gupta 184
	@Scheduled(cron = "0 0 12,18,23 ? * *")
25822 amit.gupta 185
	public void dailySaleNotification() throws Exception {
186
		log.info("daily send Notification");
29673 manish 187
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
188
		propertiesDetails.put("dailySaleNotification", "0");
189
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
190
 
25837 amit.gupta 191
		scheduledTasks.sendDailySalesNotificationToPartner(null);
29757 tejbeer 192
 
29673 manish 193
		propertiesDetails.put("dailySaleNotification", "1");
194
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
195
 
25822 amit.gupta 196
	}
24841 govind 197
 
29232 amit.gupta 198
	/*
199
	 * @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
200
	 * Exception { reconciliation.dailyReconciliation(); }
201
	 */
28205 tejbeer 202
 
27441 amit.gupta 203
	@Scheduled(cron = "0 0 1 * * *")
29801 manish 204
	public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
205
		log.info("selectFinServiceFollowUpDateByCurrDate");
206
		scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
30049 amit.gupta 207
 
29801 manish 208
	}
30049 amit.gupta 209
 
30584 amit.gupta 210
	@Scheduled(cron = "0 0 2 * * *")
27441 amit.gupta 211
	public void processActivation() throws Exception {
29757 tejbeer 212
 
29673 manish 213
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
214
		propertiesDetails.put("processActivation", "0");
215
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
216
 
27441 amit.gupta 217
		scheduledTasks.processActivation();
29757 tejbeer 218
 
29673 manish 219
		propertiesDetails.put("processActivation", "1");
220
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
221
 
27441 amit.gupta 222
	}
25721 tejbeer 223
 
30788 amit.gupta 224
	//TODO: Change it back to first of every month
225
	//@Scheduled(cron = "0 0 1 1 * *")
226
	@Scheduled(cron = "0 0 1 9 * *")
227
	public void rollOutUpgardedMargins() throws Exception {
228
		scheduledTasks.rollOutUpgardedMarginsNextMonth();
229
 
230
	}
231
 
26944 amit.gupta 232
	@Scheduled(cron = "0 */5 * * * *")
25300 tejbeer 233
	public void sendNotification() throws Throwable {
29757 tejbeer 234
 
29674 manish 235
		log.info("send Notification");
29673 manish 236
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
237
		propertiesDetails.put("sendNotification", "0");
238
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
239
 
25300 tejbeer 240
		scheduledTasks.sendNotification();
29693 manish 241
		propertiesDetails.put("sendNotification", "1");
29673 manish 242
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29674 manish 243
		log.info("send Notification Done");
29673 manish 244
 
25300 tejbeer 245
	}
28205 tejbeer 246
 
28377 tejbeer 247
	@Scheduled(cron = "0 */15 * * * *")
248
	public void checkRazorPayPaymentStatus() throws Throwable {
29757 tejbeer 249
 
29673 manish 250
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
251
		propertiesDetails.put("checkRazorPayPaymentStatus", "0");
252
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
253
 
28377 tejbeer 254
		scheduledTasks.checkRazorPayPaymentStatus();
29673 manish 255
		propertiesDetails.put("checkRazorPayPaymentStatus", "1");
256
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
257
 
28377 tejbeer 258
	}
259
 
30401 amit.gupta 260
	@Scheduled(fixedDelay = 30 * 60 * 1000)
30321 amit.gupta 261
	public void updateIrnsToInvoices() throws Throwable {
262
		runOnceTasks.updateIrnsToInvoices();
263
	}
264
 
27686 amit.gupta 265
	@Scheduled(cron = "0 */10 * * * *")
266
	public void attachToffeeInvoices() throws Throwable {
29757 tejbeer 267
 
29673 manish 268
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
269
		propertiesDetails.put("attachToffeeInvoices", "0");
270
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
271
 
27686 amit.gupta 272
		scheduledTasks.attachToffeeInvoices();
29757 tejbeer 273
 
29673 manish 274
		propertiesDetails.put("attachToffeeInvoices", "1");
275
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
276
 
27686 amit.gupta 277
	}
24841 govind 278
 
26283 tejbeer 279
	@Scheduled(cron = "0 0 5 * * *")
280
	public void ticketClosed() throws Throwable {
281
 
29673 manish 282
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
283
		propertiesDetails.put("ticketClosed", "0");
284
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
285
 
26283 tejbeer 286
		scheduledTasks.ticketClosed();
29757 tejbeer 287
 
29673 manish 288
		propertiesDetails.put("ticketClosed", "1");
289
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26283 tejbeer 290
 
291
	}
292
 
29757 tejbeer 293
	@Scheduled(cron = "0 0 8 * * *")
25721 tejbeer 294
	public void checkfocusedModelInPartnerStock() throws Throwable {
295
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 296
 
29673 manish 297
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
298
		propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
299
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
300
 
25721 tejbeer 301
		scheduledTasks.checkfocusedModelInPartnerStock();
29673 manish 302
		propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
303
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
25721 tejbeer 304
 
305
		log.info("endTime" + LocalDateTime.now());
306
	}
28205 tejbeer 307
 
26083 amit.gupta 308
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
25909 amit.gupta 309
	public void notifyLead() throws Throwable {
29757 tejbeer 310
 
29673 manish 311
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
312
		propertiesDetails.put("notifyLead", "0");
313
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
314
 
25909 amit.gupta 315
		scheduledTasks.notifyLead();
29757 tejbeer 316
 
29673 manish 317
		propertiesDetails.put("notifyLead", "1");
318
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
319
 
28205 tejbeer 320
		// scheduledTasks.notifyVisits();
25909 amit.gupta 321
	}
25721 tejbeer 322
 
26214 amit.gupta 323
	@Scheduled(cron = "0 0 1 * * *")
324
	public void fetchImeiActivation() throws Throwable {
29673 manish 325
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
326
		propertiesDetails.put("fetchImeiActivation", "0");
327
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
328
 
26408 amit.gupta 329
		runOnceTasks.fetchImeiActivation(0);
29757 tejbeer 330
 
29673 manish 331
		propertiesDetails.put("fetchImeiActivation", "1");
332
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
333
 
26214 amit.gupta 334
	}
26790 tejbeer 335
 
336
	@Scheduled(cron = "0 0 1 * * *")
337
	public void checkValidateReferral() throws Throwable {
338
		log.info("startTime" + LocalDateTime.now());
29673 manish 339
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
340
		propertiesDetails.put("checkValidateReferral", "0");
341
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
342
 
26790 tejbeer 343
		scheduledTasks.checkValidateReferral();
29757 tejbeer 344
 
29673 manish 345
		propertiesDetails.put("checkValidateReferral", "1");
346
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26790 tejbeer 347
 
348
		log.info("endTime" + LocalDateTime.now());
349
	}
350
 
28921 tejbeer 351
	// @Scheduled(cron = "0 0 8 * * *")
28205 tejbeer 352
	public void partnerProblemAlert() throws Throwable {
353
		log.info("startTime" + LocalDateTime.now());
29673 manish 354
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
355
		propertiesDetails.put("partnerProblemAlert", "0");
356
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
357
 
28205 tejbeer 358
		scheduledTasks.partnerProblemAlert();
29673 manish 359
		propertiesDetails.put("partnerProblemAlert", "1");
360
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
361
 
28205 tejbeer 362
		log.info("endTime" + LocalDateTime.now());
363
	}
28921 tejbeer 364
 
28788 amit.gupta 365
	@Scheduled(cron = "0 30 10 * * MON-SAT")
28783 amit.gupta 366
	public void sendMorningAttendanceAlert() throws Throwable {
367
		log.info("startTime" + LocalDateTime.now());
29673 manish 368
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
369
		propertiesDetails.put("sendMorningAttendanceAlert", "0");
370
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
371
 
28783 amit.gupta 372
		scheduledTasks.sendAttendanceMorningAlert();
29673 manish 373
		propertiesDetails.put("sendMorningAttendanceAlert", "1");
374
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
375
 
28783 amit.gupta 376
		log.info("endTime" + LocalDateTime.now());
377
	}
28921 tejbeer 378
 
28788 amit.gupta 379
	@Scheduled(cron = "0 30 20 * * MON-SAT")
28783 amit.gupta 380
	public void sendEveningAttendanceAlert() throws Throwable {
381
		log.info("startTime" + LocalDateTime.now());
29673 manish 382
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
383
		propertiesDetails.put("sendEveningAttendanceAlert", "0");
384
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
385
 
28783 amit.gupta 386
		scheduledTasks.sendAttendanceEveningAlert();
29673 manish 387
		propertiesDetails.put("sendEveningAttendanceAlert", "1");
388
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
389
 
28783 amit.gupta 390
		log.info("endTime" + LocalDateTime.now());
391
	}
28921 tejbeer 392
 
393
	@Scheduled(cron = "0 0 7 * * *")
394
	public void onboardingEventDelays() throws Throwable {
395
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 396
 
29673 manish 397
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
398
		propertiesDetails.put("onboardingEventDelays", "0");
399
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
400
 
28921 tejbeer 401
		onBoardingRelatedSchelduleTask.onboardingEventDelays();
29757 tejbeer 402
 
29673 manish 403
		propertiesDetails.put("onboardingEventDelays", "1");
404
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
405
 
28921 tejbeer 406
		log.info("endTime" + LocalDateTime.now());
407
	}
408
 
409
	@Scheduled(cron = "0 0 8 * * *")
410
	public void brandingAlert() throws Throwable {
411
		log.info("startTime" + LocalDateTime.now());
29673 manish 412
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
413
		propertiesDetails.put("brandingAlert", "0");
414
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
415
 
28921 tejbeer 416
		onBoardingRelatedSchelduleTask.brandingAlert();
29673 manish 417
		propertiesDetails.put("brandingAlert", "1");
418
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
419
 
28921 tejbeer 420
		log.info("endTime" + LocalDateTime.now());
421
	}
422
 
423
	@Scheduled(cron = "0 0 8 * * *")
424
	public void advancePaymentPendingAlert() throws Throwable {
425
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 426
 
29673 manish 427
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
428
		propertiesDetails.put("advancePaymentPendingAlert", "0");
429
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
430
 
28921 tejbeer 431
		onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
29673 manish 432
		propertiesDetails.put("advancePaymentPendingAlert", "1");
433
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
434
 
28921 tejbeer 435
		log.info("endTime" + LocalDateTime.now());
436
	}
437
 
438
	@Scheduled(cron = "0 0 8 * * *")
439
	public void fullPaymentPendingAlert() throws Throwable {
440
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 441
 
29673 manish 442
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
443
		propertiesDetails.put("fullPaymentPendingAlert", "0");
444
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
445
 
28921 tejbeer 446
		onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
29757 tejbeer 447
 
29673 manish 448
		propertiesDetails.put("fullPaymentPendingAlert", "1");
449
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
450
 
28921 tejbeer 451
		log.info("endTime" + LocalDateTime.now());
452
	}
453
 
28963 tejbeer 454
	@Scheduled(cron = "0 0 9 * * *")
455
	public void advancePaymentPendinglegalAlert() throws Throwable {
456
		log.info("startTime" + LocalDateTime.now());
29673 manish 457
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
458
		propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
459
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
460
 
28963 tejbeer 461
		onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
29757 tejbeer 462
 
29673 manish 463
		propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
464
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
465
 
28963 tejbeer 466
		log.info("endTime" + LocalDateTime.now());
467
	}
468
 
29035 tejbeer 469
	@Scheduled(cron = "0 */5 * * * *")
470
	public void onBoardingCompleteEventEmail() throws Throwable {
471
		log.info("startTime" + LocalDateTime.now());
29673 manish 472
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
473
		propertiesDetails.put("onBoardingCompleteEventEmail", "0");
474
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
475
 
29035 tejbeer 476
		onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
29673 manish 477
		propertiesDetails.put("onBoardingCompleteEventEmail", "1");
478
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
479
 
29035 tejbeer 480
		log.info("endTime" + LocalDateTime.now());
481
	}
29040 tejbeer 482
 
30667 amit.gupta 483
 
30731 amit.gupta 484
	@Scheduled(cron = "0 */2 * * * *")
30667 amit.gupta 485
	public void updateSaholicCISTable() throws Throwable {
486
		log.info("startTime" + LocalDateTime.now());
487
		runOnceTasks.updateSaholicCISTable();
488
		log.info("endTime" + LocalDateTime.now());
489
	}
490
 
30390 amit.gupta 491
	@Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
492
	public void fetchPartnerStat() throws Throwable {
493
		scheduledTasks.fetchParnterStats();
494
	}
495
 
29255 tejbeer 496
	@Scheduled(cron = "0 0 9 * * *")
497
	public void storeTimelinePromoterPending() throws Throwable {
498
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 499
 
29673 manish 500
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
501
		propertiesDetails.put("storeTimelinePromoterPending", "0");
502
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
503
 
29255 tejbeer 504
		onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
29673 manish 505
		propertiesDetails.put("storeTimelinePromoterPending", "1");
506
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
507
 
29255 tejbeer 508
		log.info("endTime" + LocalDateTime.now());
509
	}
29668 tejbeer 510
 
29467 amit.gupta 511
	@Scheduled(cron = "0 0 23 * * *")
29492 manish 512
	public void checkItelImeiActivation() throws Throwable {
513
		log.info("startTime" + LocalDate.now());
29673 manish 514
 
515
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
516
		propertiesDetails.put("checkItelImeiActivation", "0");
517
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29694 manish 518
		log.info("startTimecheckItelImeiActivation" + LocalDate.now());
30837 amit.gupta 519
		scheduledTasks.checkItelImeiActivation(LocalDate.now(), 90);
29757 tejbeer 520
		long secs = (new Date().getTime()) / 1000;
29694 manish 521
		log.info("endTimecheckItelImeiActivation" + LocalDate.now());
29673 manish 522
		propertiesDetails.put("checkItelImeiActivation", "1");
29757 tejbeer 523
		propertiesDetails.put("itelDate", Long.toString(secs));
29673 manish 524
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
525
 
29757 tejbeer 526
	}
29673 manish 527
 
29492 manish 528
	@Scheduled(cron = "0 0 23 * * *")
529
	public void checkTecnoImeiActivation() throws Throwable {
29757 tejbeer 530
 
29673 manish 531
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
532
		propertiesDetails.put("checkTecnoImeiActivation", "0");
533
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
534
 
29492 manish 535
		log.info("startTime" + LocalDate.now());
29694 manish 536
		log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
30837 amit.gupta 537
		scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 90);
29694 manish 538
		log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
29757 tejbeer 539
 
540
		long secs = (new Date().getTime()) / 1000;
29673 manish 541
		propertiesDetails.put("checkTecnoImeiActivation", "1");
29691 manish 542
		propertiesDetails.put("technoDate", Long.toString(secs));
29673 manish 543
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29757 tejbeer 544
 
29492 manish 545
	}
29668 tejbeer 546
 
30370 amit.gupta 547
	@Scheduled(fixedDelay = 60 * 1000)
29457 manish 548
	public void vivoImeiActivation() throws Throwable {
29694 manish 549
		log.info("startTimevivoImeiActivation" + LocalDateTime.now());
29757 tejbeer 550
 
29673 manish 551
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
552
		propertiesDetails.put("vivoImeiActivation", "0");
553
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
554
 
29457 manish 555
		scheduledTasks.checkImeiActivation();
29757 tejbeer 556
		long secs = (new Date().getTime()) / 1000;
29694 manish 557
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
29673 manish 558
		propertiesDetails.put("vivoImeiActivation", "1");
29757 tejbeer 559
 
29691 manish 560
		propertiesDetails.put("vivoDate", Long.toString(secs));
29673 manish 561
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
562
 
29457 manish 563
	}
29255 tejbeer 564
 
30421 tejbeer 565
	@Scheduled(cron = "0 0 8 * * *")
566
	public void reviewUncontactablePartner() throws Throwable {
567
		log.info("startTime" + LocalDateTime.now());
568
 
569
		scheduledTasks.reviewUncontactablePartner();
570
 
571
	}
572
 
30352 amit.gupta 573
	@Autowired
574
	private StandAlone standAlone;
575
 
30370 amit.gupta 576
	@Scheduled(fixedDelay = 60 * 1000)
30352 amit.gupta 577
	public void oppo() throws Throwable {
578
		standAlone.checkOppoImeiStatus();
579
	}
580
 
29316 tejbeer 581
	@Scheduled(cron = "0 0 * * * *")
29308 tejbeer 582
	public void markDelhiveryOrderDelivered() throws Throwable {
29673 manish 583
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
584
		propertiesDetails.put("markDelhiveryOrderDelivered", "0");
585
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
586
 
29308 tejbeer 587
		log.info("startTime" + LocalDateTime.now());
588
		scheduledTasks.markDelhiveryOrderDelivered();
29673 manish 589
		propertiesDetails.put("markDelhiveryOrderDelivered", "1");
590
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
591
 
29308 tejbeer 592
		log.info("endTime" + LocalDateTime.now());
593
	}
594
 
30637 amit.gupta 595
	@Scheduled(cron = "0 4 * * * *")
596
	public void processPriceDrop() throws Throwable {
597
		scheduledTasks.processPriceDrop();
598
	}
599
 
29208 tejbeer 600
	/*
601
	 * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
602
	 * throws Throwable { log.info("startTime" + LocalDateTime.now());
603
	 * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
604
	 * log.info("endTime" + LocalDateTime.now()); }
605
	 */
23756 amit.gupta 606
}