Subversion Repositories SmartDukaan

Rev

Rev 29694 | Rev 29696 | 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
 
29673 manish 3
import java.io.IOException;
29492 manish 4
import java.time.LocalDate;
24420 amit.gupta 5
import java.time.LocalDateTime;
29691 manish 6
import java.util.Date;
29673 manish 7
import java.util.LinkedHashMap;
24121 govind 8
 
23756 amit.gupta 9
import org.apache.logging.log4j.LogManager;
10
import org.apache.logging.log4j.Logger;
11
import org.springframework.beans.factory.annotation.Autowired;
12
import org.springframework.scheduling.annotation.Scheduled;
13
import org.springframework.stereotype.Component;
14
 
25782 amit.gupta 15
import com.smartdukaan.cron.migrations.RunOnceTasks;
23756 amit.gupta 16
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
29673 manish 17
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
27007 amit.gupta 18
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
24121 govind 19
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
29673 manish 20
import com.spice.profitmandi.common.model.RechargeCredential;
23756 amit.gupta 21
 
22
@Component
23
public class ScheduledSkeleton {
23794 govind 24
 
23756 amit.gupta 25
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
26
 
27
	@Autowired
24784 amit.gupta 28
	private ScheduledTasks scheduledTasks;
28205 tejbeer 29
 
27007 amit.gupta 30
	@Autowired
31
	private LeadSyncRunner leadSyncRunner;
24841 govind 32
 
24784 amit.gupta 33
	@Autowired
34
	private Reconciliation reconciliation;
25822 amit.gupta 35
 
25782 amit.gupta 36
	@Autowired
37
	private RunOnceTasks runOnceTasks;
23756 amit.gupta 38
 
39
	@Autowired
40
	NagiosMonitorTasks nagiosMonitorTasks;
24188 govind 41
 
24135 govind 42
	@Autowired
24841 govind 43
	private TicketRelatedScheduledTask ticketRelatedScheduledTask;
44
 
28921 tejbeer 45
	@Autowired
46
	private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
47
 
29673 manish 48
	@Autowired
49
	private WriteToPropertiesFile writeToPropertiesFile;
50
 
29674 manish 51
	String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
29691 manish 52
 
29255 tejbeer 53
	// @Scheduled(cron = "0 0 2 * * *")
24420 amit.gupta 54
	public void processDailySchemes() throws Exception {
29673 manish 55
 
56
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
57
		propertiesDetails.put("processDailySchemes", "0");
58
 
59
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
60
 
28183 amit.gupta 61
		scheduledTasks.processScheme(LocalDateTime.now().minusDays(7), LocalDateTime.now(), false);
29673 manish 62
 
63
		propertiesDetails.put("processDailySchemes", "1");
64
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
65
 
24420 amit.gupta 66
	}
24841 govind 67
 
23761 amit.gupta 68
	@Scheduled(cron = "0 15 0 * * *")
25782 amit.gupta 69
	public void runOnceTasks() throws Exception {
29673 manish 70
 
71
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
72
		propertiesDetails.put("runOnceTasks", "0");
73
 
74
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
75
 
23756 amit.gupta 76
		scheduledTasks.reconcileRecharge();
29673 manish 77
 
78
		propertiesDetails.put("runOnceTasks", "1");
79
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
23756 amit.gupta 80
	}
25822 amit.gupta 81
 
28205 tejbeer 82
	/*
83
	 * @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
84
	 * throws Exception { runOnceTasks.mailDashboardScreenshots(); }
85
	 */
25721 tejbeer 86
 
23759 amit.gupta 87
	@Scheduled(cron = "0 05 0 1,16 * ?")
23756 amit.gupta 88
	public void processRechargeCashback() throws Throwable {
29673 manish 89
 
90
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
91
		propertiesDetails.put("processRechargeCashback", "0");
92
 
93
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
23756 amit.gupta 94
		scheduledTasks.processRechargeCashback();
29673 manish 95
 
96
		propertiesDetails.put("processRechargeCashback", "1");
97
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
98
 
23756 amit.gupta 99
	}
23794 govind 100
 
27267 amit.gupta 101
	@Scheduled(cron = "0 0 6 * * *")
25563 amit.gupta 102
	public void sendPartnerInvestmentDetails() throws Exception {
29673 manish 103
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
104
		propertiesDetails.put("sendPartnerInvestmentDetails", "0");
105
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
23929 amit.gupta 106
		scheduledTasks.sendPartnerInvestmentDetails();
29695 manish 107
		long secs = (new Date().getTime())/1000;
108
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
29673 manish 109
 
29695 manish 110
		propertiesDetails.put("investmentDate", Long.toString(secs));
29673 manish 111
		propertiesDetails.put("sendPartnerInvestmentDetails", "1");
112
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
113
 
25893 amit.gupta 114
	}
28921 tejbeer 115
 
28632 amit.gupta 116
	@Scheduled(cron = "0 0 10,15,17 * * *")
117
	public void sendIndentTertiaryReport() throws Exception {
29673 manish 118
 
119
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
120
		propertiesDetails.put("sendIndentTertiaryReport", "0");
121
 
122
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
123
 
28632 amit.gupta 124
		scheduledTasks.sendIndentTertiary();
29673 manish 125
 
126
		propertiesDetails.put("sendIndentTertiaryReport", "1");
127
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
128
 
28632 amit.gupta 129
	}
28921 tejbeer 130
 
28709 amit.gupta 131
	@Scheduled(cron = "0 0 6 * * *")
132
	public void checkPartnerActiveStoreByStatus() throws Exception {
29673 manish 133
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
134
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
135
 
136
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
137
 
138
 
28709 amit.gupta 139
		scheduledTasks.checkPartnerActiveStore();
29673 manish 140
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
141
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
142
 
28709 amit.gupta 143
	}
26790 tejbeer 144
 
28921 tejbeer 145
	// @Scheduled(cron = "0 0 8 * * *")
24681 amit.gupta 146
	public void sendStockAgeingReport() throws Throwable {
29673 manish 147
 
148
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
149
		propertiesDetails.put("sendStockAgeingReport", "0");
150
 
151
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
152
 
24681 amit.gupta 153
		scheduledTasks.sendAgeingReport();
29673 manish 154
 
155
		propertiesDetails.put("sendStockAgeingReport", "1");
156
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
157
 
24681 amit.gupta 158
	}
24131 govind 159
 
24890 amit.gupta 160
	@Scheduled(cron = "0 0/30 1-23 * * *")
29673 manish 161
	public void escalateTicket() throws Exception {
24653 govind 162
		log.info("escalate ticket");
29673 manish 163
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
164
		propertiesDetails.put("escalateTicket", "0");
165
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
24841 govind 166
		ticketRelatedScheduledTask.escalateTicket();
29673 manish 167
 
168
		propertiesDetails.put("escalateTicket", "1");
169
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
170
 
24533 govind 171
	}
24841 govind 172
 
173
	@Scheduled(cron = "0 0 11 * * *")
174
	public void alertTicketToUser() throws Exception {
24653 govind 175
		log.info("alert for ticket");
29673 manish 176
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
177
		propertiesDetails.put("alertTicketToUser", "0");
178
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
179
 
24841 govind 180
		ticketRelatedScheduledTask.alertforTicket();
29673 manish 181
		propertiesDetails.put("alertTicketToUser", "1");
182
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
183
 
24653 govind 184
	}
24841 govind 185
 
26943 amit.gupta 186
	@Scheduled(cron = "0 0 12,18,23 ? * *")
25822 amit.gupta 187
	public void dailySaleNotification() throws Exception {
188
		log.info("daily send Notification");
29673 manish 189
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
190
		propertiesDetails.put("dailySaleNotification", "0");
191
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
192
 
25837 amit.gupta 193
		scheduledTasks.sendDailySalesNotificationToPartner(null);
29673 manish 194
 
195
		propertiesDetails.put("dailySaleNotification", "1");
196
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
197
 
25822 amit.gupta 198
	}
24841 govind 199
 
29232 amit.gupta 200
	/*
201
	 * @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
202
	 * Exception { reconciliation.dailyReconciliation(); }
203
	 */
28205 tejbeer 204
 
27441 amit.gupta 205
	@Scheduled(cron = "0 0 1 * * *")
206
	public void processActivation() throws Exception {
29673 manish 207
 
208
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
209
		propertiesDetails.put("processActivation", "0");
210
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
211
 
27441 amit.gupta 212
		scheduledTasks.processActivation();
29673 manish 213
 
214
		propertiesDetails.put("processActivation", "1");
215
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
216
 
27441 amit.gupta 217
	}
25721 tejbeer 218
 
26944 amit.gupta 219
	@Scheduled(cron = "0 */5 * * * *")
25300 tejbeer 220
	public void sendNotification() throws Throwable {
29673 manish 221
 
29674 manish 222
		log.info("send Notification");
29673 manish 223
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
224
		propertiesDetails.put("sendNotification", "0");
225
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
226
 
25300 tejbeer 227
		scheduledTasks.sendNotification();
29693 manish 228
		propertiesDetails.put("sendNotification", "1");
29673 manish 229
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29674 manish 230
		log.info("send Notification Done");
29673 manish 231
 
25300 tejbeer 232
	}
28205 tejbeer 233
 
28377 tejbeer 234
	@Scheduled(cron = "0 */15 * * * *")
235
	public void checkRazorPayPaymentStatus() throws Throwable {
29673 manish 236
 
237
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
238
		propertiesDetails.put("checkRazorPayPaymentStatus", "0");
239
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
240
 
28377 tejbeer 241
		scheduledTasks.checkRazorPayPaymentStatus();
29673 manish 242
		propertiesDetails.put("checkRazorPayPaymentStatus", "1");
243
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
244
 
28377 tejbeer 245
	}
29673 manish 246
 
28377 tejbeer 247
 
27686 amit.gupta 248
	@Scheduled(cron = "0 */10 * * * *")
249
	public void attachToffeeInvoices() throws Throwable {
29673 manish 250
 
251
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
252
		propertiesDetails.put("attachToffeeInvoices", "0");
253
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
254
 
27686 amit.gupta 255
		scheduledTasks.attachToffeeInvoices();
29673 manish 256
 
257
		propertiesDetails.put("attachToffeeInvoices", "1");
258
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
259
 
27686 amit.gupta 260
	}
24841 govind 261
 
26283 tejbeer 262
	@Scheduled(cron = "0 0 5 * * *")
263
	public void ticketClosed() throws Throwable {
264
 
29673 manish 265
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
266
		propertiesDetails.put("ticketClosed", "0");
267
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
268
 
26283 tejbeer 269
		scheduledTasks.ticketClosed();
29673 manish 270
 
271
		propertiesDetails.put("ticketClosed", "1");
272
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26283 tejbeer 273
 
29673 manish 274
 
26283 tejbeer 275
	}
276
 
29668 tejbeer 277
	@Scheduled(cron = "0 0 10 * * *")
25721 tejbeer 278
	public void checkfocusedModelInPartnerStock() throws Throwable {
279
		log.info("startTime" + LocalDateTime.now());
29673 manish 280
 
281
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
282
		propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
283
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
284
 
25721 tejbeer 285
		scheduledTasks.checkfocusedModelInPartnerStock();
29673 manish 286
		propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
287
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
25721 tejbeer 288
 
29673 manish 289
 
25721 tejbeer 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 {
29673 manish 295
 
296
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
297
		propertiesDetails.put("notifyLead", "0");
298
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
299
 
25909 amit.gupta 300
		scheduledTasks.notifyLead();
29673 manish 301
 
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
 
314
 
26408 amit.gupta 315
		runOnceTasks.fetchImeiActivation(0);
29673 manish 316
 
317
		propertiesDetails.put("fetchImeiActivation", "1");
318
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
319
 
26214 amit.gupta 320
	}
26790 tejbeer 321
 
322
	@Scheduled(cron = "0 0 1 * * *")
323
	public void checkValidateReferral() throws Throwable {
324
		log.info("startTime" + LocalDateTime.now());
29673 manish 325
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
326
		propertiesDetails.put("checkValidateReferral", "0");
327
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
328
 
26790 tejbeer 329
		scheduledTasks.checkValidateReferral();
29673 manish 330
 
331
		propertiesDetails.put("checkValidateReferral", "1");
332
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
26790 tejbeer 333
 
29673 manish 334
 
26790 tejbeer 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());
29673 manish 383
 
384
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
385
		propertiesDetails.put("onboardingEventDelays", "0");
386
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
387
 
28921 tejbeer 388
		onBoardingRelatedSchelduleTask.onboardingEventDelays();
29673 manish 389
 
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());
29673 manish 413
 
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());
29673 manish 428
 
429
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
430
		propertiesDetails.put("fullPaymentPendingAlert", "0");
431
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
432
 
28921 tejbeer 433
		onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
29673 manish 434
 
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();
29673 manish 449
 
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());
29673 manish 473
 
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);
29691 manish 494
		long secs = (new Date().getTime())/1000;
29694 manish 495
		log.info("endTimecheckItelImeiActivation" + LocalDate.now());
29673 manish 496
		propertiesDetails.put("checkItelImeiActivation", "1");
29691 manish 497
		propertiesDetails.put("itelDate",  Long.toString(secs));
29673 manish 498
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29691 manish 499
 
500
		}
29673 manish 501
 
502
 
29492 manish 503
	@Scheduled(cron = "0 0 23 * * *")
504
	public void checkTecnoImeiActivation() throws Throwable {
29673 manish 505
 
506
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
507
		propertiesDetails.put("checkTecnoImeiActivation", "0");
508
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
509
 
29492 manish 510
		log.info("startTime" + LocalDate.now());
29694 manish 511
		log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
29668 tejbeer 512
		scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
29694 manish 513
		log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
29673 manish 514
 
29691 manish 515
		long secs = (new Date().getTime())/1000;
29673 manish 516
		propertiesDetails.put("checkTecnoImeiActivation", "1");
29691 manish 517
		propertiesDetails.put("technoDate", Long.toString(secs));
29673 manish 518
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
29691 manish 519
 
29492 manish 520
	}
29668 tejbeer 521
 
29492 manish 522
	@Scheduled(cron = "0 0 23 * * *")
29457 manish 523
	public void vivoImeiActivation() throws Throwable {
29694 manish 524
		log.info("startTimevivoImeiActivation" + LocalDateTime.now());
29673 manish 525
 
526
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
527
		propertiesDetails.put("vivoImeiActivation", "0");
528
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
529
 
29457 manish 530
		scheduledTasks.checkImeiActivation();
29691 manish 531
		long secs = (new Date().getTime())/1000;
29694 manish 532
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
29673 manish 533
		propertiesDetails.put("vivoImeiActivation", "1");
29691 manish 534
 
535
		propertiesDetails.put("vivoDate", Long.toString(secs));
29673 manish 536
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
537
 
29457 manish 538
	}
29255 tejbeer 539
 
29316 tejbeer 540
	@Scheduled(cron = "0 0 * * * *")
29308 tejbeer 541
	public void markDelhiveryOrderDelivered() throws Throwable {
29673 manish 542
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
543
		propertiesDetails.put("markDelhiveryOrderDelivered", "0");
544
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
545
 
29308 tejbeer 546
		log.info("startTime" + LocalDateTime.now());
547
		scheduledTasks.markDelhiveryOrderDelivered();
29673 manish 548
		propertiesDetails.put("markDelhiveryOrderDelivered", "1");
549
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
550
 
29308 tejbeer 551
		log.info("endTime" + LocalDateTime.now());
552
	}
553
 
29208 tejbeer 554
	/*
555
	 * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
556
	 * throws Throwable { log.info("startTime" + LocalDateTime.now());
557
	 * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
558
	 * log.info("endTime" + LocalDateTime.now()); }
559
	 */
23756 amit.gupta 560
}