Subversion Repositories SmartDukaan

Rev

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