Subversion Repositories SmartDukaan

Rev

Rev 30345 | Rev 30361 | 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
 
29801 manish 210
	@Scheduled(cron = "0 0 1 * * *")
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
 
26944 amit.gupta 224
	@Scheduled(cron = "0 */5 * * * *")
25300 tejbeer 225
	public void sendNotification() throws Throwable {
29757 tejbeer 226
 
29674 manish 227
		log.info("send Notification");
29673 manish 228
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
229
		propertiesDetails.put("sendNotification", "0");
230
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
231
 
25300 tejbeer 232
		scheduledTasks.sendNotification();
29693 manish 233
		propertiesDetails.put("sendNotification", "1");
29673 manish 234
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29674 manish 235
		log.info("send Notification Done");
29673 manish 236
 
25300 tejbeer 237
	}
28205 tejbeer 238
 
28377 tejbeer 239
	@Scheduled(cron = "0 */15 * * * *")
240
	public void checkRazorPayPaymentStatus() throws Throwable {
29757 tejbeer 241
 
29673 manish 242
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
243
		propertiesDetails.put("checkRazorPayPaymentStatus", "0");
244
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
245
 
28377 tejbeer 246
		scheduledTasks.checkRazorPayPaymentStatus();
29673 manish 247
		propertiesDetails.put("checkRazorPayPaymentStatus", "1");
248
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
249
 
28377 tejbeer 250
	}
251
 
30321 amit.gupta 252
	@Scheduled(cron = "0 */15 * * * *")
253
	public void updateIrnsToInvoices() throws Throwable {
254
 
255
		runOnceTasks.updateIrnsToInvoices();
256
	}
257
 
27686 amit.gupta 258
	@Scheduled(cron = "0 */10 * * * *")
259
	public void attachToffeeInvoices() throws Throwable {
29757 tejbeer 260
 
29673 manish 261
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
262
		propertiesDetails.put("attachToffeeInvoices", "0");
263
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
264
 
27686 amit.gupta 265
		scheduledTasks.attachToffeeInvoices();
29757 tejbeer 266
 
29673 manish 267
		propertiesDetails.put("attachToffeeInvoices", "1");
268
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
269
 
27686 amit.gupta 270
	}
24841 govind 271
 
26283 tejbeer 272
	@Scheduled(cron = "0 0 5 * * *")
273
	public void ticketClosed() throws Throwable {
274
 
29673 manish 275
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
276
		propertiesDetails.put("ticketClosed", "0");
277
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
278
 
26283 tejbeer 279
		scheduledTasks.ticketClosed();
29757 tejbeer 280
 
29673 manish 281
		propertiesDetails.put("ticketClosed", "1");
282
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26283 tejbeer 283
 
284
	}
285
 
29757 tejbeer 286
	@Scheduled(cron = "0 0 8 * * *")
25721 tejbeer 287
	public void checkfocusedModelInPartnerStock() throws Throwable {
288
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 289
 
29673 manish 290
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
291
		propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
292
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
293
 
25721 tejbeer 294
		scheduledTasks.checkfocusedModelInPartnerStock();
29673 manish 295
		propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
296
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
25721 tejbeer 297
 
298
		log.info("endTime" + LocalDateTime.now());
299
	}
28205 tejbeer 300
 
26083 amit.gupta 301
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
25909 amit.gupta 302
	public void notifyLead() throws Throwable {
29757 tejbeer 303
 
29673 manish 304
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
305
		propertiesDetails.put("notifyLead", "0");
306
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
307
 
25909 amit.gupta 308
		scheduledTasks.notifyLead();
29757 tejbeer 309
 
29673 manish 310
		propertiesDetails.put("notifyLead", "1");
311
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
312
 
28205 tejbeer 313
		// scheduledTasks.notifyVisits();
25909 amit.gupta 314
	}
25721 tejbeer 315
 
26214 amit.gupta 316
	@Scheduled(cron = "0 0 1 * * *")
317
	public void fetchImeiActivation() throws Throwable {
29673 manish 318
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
319
		propertiesDetails.put("fetchImeiActivation", "0");
320
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
321
 
26408 amit.gupta 322
		runOnceTasks.fetchImeiActivation(0);
29757 tejbeer 323
 
29673 manish 324
		propertiesDetails.put("fetchImeiActivation", "1");
325
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
326
 
26214 amit.gupta 327
	}
26790 tejbeer 328
 
329
	@Scheduled(cron = "0 0 1 * * *")
330
	public void checkValidateReferral() throws Throwable {
331
		log.info("startTime" + LocalDateTime.now());
29673 manish 332
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
333
		propertiesDetails.put("checkValidateReferral", "0");
334
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
335
 
26790 tejbeer 336
		scheduledTasks.checkValidateReferral();
29757 tejbeer 337
 
29673 manish 338
		propertiesDetails.put("checkValidateReferral", "1");
339
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26790 tejbeer 340
 
341
		log.info("endTime" + LocalDateTime.now());
342
	}
343
 
28921 tejbeer 344
	// @Scheduled(cron = "0 0 8 * * *")
28205 tejbeer 345
	public void partnerProblemAlert() throws Throwable {
346
		log.info("startTime" + LocalDateTime.now());
29673 manish 347
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
348
		propertiesDetails.put("partnerProblemAlert", "0");
349
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
350
 
28205 tejbeer 351
		scheduledTasks.partnerProblemAlert();
29673 manish 352
		propertiesDetails.put("partnerProblemAlert", "1");
353
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
354
 
28205 tejbeer 355
		log.info("endTime" + LocalDateTime.now());
356
	}
28921 tejbeer 357
 
28788 amit.gupta 358
	@Scheduled(cron = "0 30 10 * * MON-SAT")
28783 amit.gupta 359
	public void sendMorningAttendanceAlert() throws Throwable {
360
		log.info("startTime" + LocalDateTime.now());
29673 manish 361
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
362
		propertiesDetails.put("sendMorningAttendanceAlert", "0");
363
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
364
 
28783 amit.gupta 365
		scheduledTasks.sendAttendanceMorningAlert();
29673 manish 366
		propertiesDetails.put("sendMorningAttendanceAlert", "1");
367
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
368
 
28783 amit.gupta 369
		log.info("endTime" + LocalDateTime.now());
370
	}
28921 tejbeer 371
 
28788 amit.gupta 372
	@Scheduled(cron = "0 30 20 * * MON-SAT")
28783 amit.gupta 373
	public void sendEveningAttendanceAlert() throws Throwable {
374
		log.info("startTime" + LocalDateTime.now());
29673 manish 375
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
376
		propertiesDetails.put("sendEveningAttendanceAlert", "0");
377
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
378
 
28783 amit.gupta 379
		scheduledTasks.sendAttendanceEveningAlert();
29673 manish 380
		propertiesDetails.put("sendEveningAttendanceAlert", "1");
381
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
382
 
28783 amit.gupta 383
		log.info("endTime" + LocalDateTime.now());
384
	}
28921 tejbeer 385
 
386
	@Scheduled(cron = "0 0 7 * * *")
387
	public void onboardingEventDelays() throws Throwable {
388
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 389
 
29673 manish 390
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
391
		propertiesDetails.put("onboardingEventDelays", "0");
392
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
393
 
28921 tejbeer 394
		onBoardingRelatedSchelduleTask.onboardingEventDelays();
29757 tejbeer 395
 
29673 manish 396
		propertiesDetails.put("onboardingEventDelays", "1");
397
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
398
 
28921 tejbeer 399
		log.info("endTime" + LocalDateTime.now());
400
	}
401
 
402
	@Scheduled(cron = "0 0 8 * * *")
403
	public void brandingAlert() throws Throwable {
404
		log.info("startTime" + LocalDateTime.now());
29673 manish 405
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
406
		propertiesDetails.put("brandingAlert", "0");
407
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
408
 
28921 tejbeer 409
		onBoardingRelatedSchelduleTask.brandingAlert();
29673 manish 410
		propertiesDetails.put("brandingAlert", "1");
411
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
412
 
28921 tejbeer 413
		log.info("endTime" + LocalDateTime.now());
414
	}
415
 
416
	@Scheduled(cron = "0 0 8 * * *")
417
	public void advancePaymentPendingAlert() throws Throwable {
418
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 419
 
29673 manish 420
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
421
		propertiesDetails.put("advancePaymentPendingAlert", "0");
422
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
423
 
28921 tejbeer 424
		onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
29673 manish 425
		propertiesDetails.put("advancePaymentPendingAlert", "1");
426
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
427
 
28921 tejbeer 428
		log.info("endTime" + LocalDateTime.now());
429
	}
430
 
431
	@Scheduled(cron = "0 0 8 * * *")
432
	public void fullPaymentPendingAlert() throws Throwable {
433
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 434
 
29673 manish 435
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
436
		propertiesDetails.put("fullPaymentPendingAlert", "0");
437
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
438
 
28921 tejbeer 439
		onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
29757 tejbeer 440
 
29673 manish 441
		propertiesDetails.put("fullPaymentPendingAlert", "1");
442
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
443
 
28921 tejbeer 444
		log.info("endTime" + LocalDateTime.now());
445
	}
446
 
28963 tejbeer 447
	@Scheduled(cron = "0 0 9 * * *")
448
	public void advancePaymentPendinglegalAlert() throws Throwable {
449
		log.info("startTime" + LocalDateTime.now());
29673 manish 450
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
451
		propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
452
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
453
 
28963 tejbeer 454
		onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
29757 tejbeer 455
 
29673 manish 456
		propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
457
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
458
 
28963 tejbeer 459
		log.info("endTime" + LocalDateTime.now());
460
	}
461
 
29035 tejbeer 462
	@Scheduled(cron = "0 */5 * * * *")
463
	public void onBoardingCompleteEventEmail() throws Throwable {
464
		log.info("startTime" + LocalDateTime.now());
29673 manish 465
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
466
		propertiesDetails.put("onBoardingCompleteEventEmail", "0");
467
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
468
 
29035 tejbeer 469
		onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
29673 manish 470
		propertiesDetails.put("onBoardingCompleteEventEmail", "1");
471
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
472
 
29035 tejbeer 473
		log.info("endTime" + LocalDateTime.now());
474
	}
29040 tejbeer 475
 
29255 tejbeer 476
	@Scheduled(cron = "0 0 9 * * *")
477
	public void storeTimelinePromoterPending() throws Throwable {
478
		log.info("startTime" + LocalDateTime.now());
29757 tejbeer 479
 
29673 manish 480
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
481
		propertiesDetails.put("storeTimelinePromoterPending", "0");
482
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
483
 
29255 tejbeer 484
		onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
29673 manish 485
		propertiesDetails.put("storeTimelinePromoterPending", "1");
486
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
487
 
29255 tejbeer 488
		log.info("endTime" + LocalDateTime.now());
489
	}
29668 tejbeer 490
 
29467 amit.gupta 491
	@Scheduled(cron = "0 0 23 * * *")
29492 manish 492
	public void checkItelImeiActivation() throws Throwable {
493
		log.info("startTime" + LocalDate.now());
29673 manish 494
 
495
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
496
		propertiesDetails.put("checkItelImeiActivation", "0");
497
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29694 manish 498
		log.info("startTimecheckItelImeiActivation" + LocalDate.now());
29668 tejbeer 499
		scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
29757 tejbeer 500
		long secs = (new Date().getTime()) / 1000;
29694 manish 501
		log.info("endTimecheckItelImeiActivation" + LocalDate.now());
29673 manish 502
		propertiesDetails.put("checkItelImeiActivation", "1");
29757 tejbeer 503
		propertiesDetails.put("itelDate", Long.toString(secs));
29673 manish 504
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
505
 
29757 tejbeer 506
	}
29673 manish 507
 
29492 manish 508
	@Scheduled(cron = "0 0 23 * * *")
509
	public void checkTecnoImeiActivation() throws Throwable {
29757 tejbeer 510
 
29673 manish 511
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
512
		propertiesDetails.put("checkTecnoImeiActivation", "0");
513
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
514
 
29492 manish 515
		log.info("startTime" + LocalDate.now());
29694 manish 516
		log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
29668 tejbeer 517
		scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
29694 manish 518
		log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
29757 tejbeer 519
 
520
		long secs = (new Date().getTime()) / 1000;
29673 manish 521
		propertiesDetails.put("checkTecnoImeiActivation", "1");
29691 manish 522
		propertiesDetails.put("technoDate", Long.toString(secs));
29673 manish 523
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29757 tejbeer 524
 
29492 manish 525
	}
29668 tejbeer 526
 
30345 amit.gupta 527
	@Scheduled(fixedDelay = 240 * 1000)
29457 manish 528
	public void vivoImeiActivation() throws Throwable {
29694 manish 529
		log.info("startTimevivoImeiActivation" + LocalDateTime.now());
29757 tejbeer 530
 
29673 manish 531
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
532
		propertiesDetails.put("vivoImeiActivation", "0");
533
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
534
 
29457 manish 535
		scheduledTasks.checkImeiActivation();
29757 tejbeer 536
		long secs = (new Date().getTime()) / 1000;
29694 manish 537
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
29673 manish 538
		propertiesDetails.put("vivoImeiActivation", "1");
29757 tejbeer 539
 
29691 manish 540
		propertiesDetails.put("vivoDate", Long.toString(secs));
29673 manish 541
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
542
 
29457 manish 543
	}
29255 tejbeer 544
 
30352 amit.gupta 545
	@Autowired
546
	private StandAlone standAlone;
547
 
548
	@Scheduled(fixedRate = 3600 * 1000)
549
	public void oppo() throws Throwable {
550
		standAlone.checkOppoImeiStatus();
551
	}
552
 
29316 tejbeer 553
	@Scheduled(cron = "0 0 * * * *")
29308 tejbeer 554
	public void markDelhiveryOrderDelivered() throws Throwable {
29673 manish 555
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
556
		propertiesDetails.put("markDelhiveryOrderDelivered", "0");
557
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
558
 
29308 tejbeer 559
		log.info("startTime" + LocalDateTime.now());
560
		scheduledTasks.markDelhiveryOrderDelivered();
29673 manish 561
		propertiesDetails.put("markDelhiveryOrderDelivered", "1");
562
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
563
 
29308 tejbeer 564
		log.info("endTime" + LocalDateTime.now());
565
	}
566
 
29208 tejbeer 567
	/*
568
	 * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
569
	 * throws Throwable { log.info("startTime" + LocalDateTime.now());
570
	 * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
571
	 * log.info("endTime" + LocalDateTime.now()); }
572
	 */
23756 amit.gupta 573
}