Subversion Repositories SmartDukaan

Rev

Rev 29668 | Rev 29674 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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