Subversion Repositories SmartDukaan

Rev

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