| 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;
|
| 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;
|
| 24121 |
govind |
18 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 29673 |
manish |
19 |
import com.spice.profitmandi.common.model.RechargeCredential;
|
| 23756 |
amit.gupta |
20 |
|
|
|
21 |
@Component
|
|
|
22 |
public class ScheduledSkeleton {
|
| 23794 |
govind |
23 |
|
| 23756 |
amit.gupta |
24 |
private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
|
|
|
25 |
|
|
|
26 |
@Autowired
|
| 24784 |
amit.gupta |
27 |
private ScheduledTasks scheduledTasks;
|
| 28205 |
tejbeer |
28 |
|
| 27007 |
amit.gupta |
29 |
@Autowired
|
|
|
30 |
private LeadSyncRunner leadSyncRunner;
|
| 24841 |
govind |
31 |
|
| 24784 |
amit.gupta |
32 |
@Autowired
|
|
|
33 |
private Reconciliation reconciliation;
|
| 25822 |
amit.gupta |
34 |
|
| 25782 |
amit.gupta |
35 |
@Autowired
|
|
|
36 |
private RunOnceTasks runOnceTasks;
|
| 23756 |
amit.gupta |
37 |
|
|
|
38 |
@Autowired
|
|
|
39 |
NagiosMonitorTasks nagiosMonitorTasks;
|
| 24188 |
govind |
40 |
|
| 24135 |
govind |
41 |
@Autowired
|
| 24841 |
govind |
42 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
|
|
43 |
|
| 28921 |
tejbeer |
44 |
@Autowired
|
|
|
45 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
|
|
46 |
|
| 29673 |
manish |
47 |
@Autowired
|
|
|
48 |
private WriteToPropertiesFile writeToPropertiesFile;
|
|
|
49 |
|
|
|
50 |
String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring-.properties";
|
|
|
51 |
|
| 29255 |
tejbeer |
52 |
// @Scheduled(cron = "0 0 2 * * *")
|
| 24420 |
amit.gupta |
53 |
public void processDailySchemes() throws Exception {
|
| 29673 |
manish |
54 |
|
|
|
55 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
56 |
propertiesDetails.put("processDailySchemes", "0");
|
|
|
57 |
|
|
|
58 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
59 |
|
| 28183 |
amit.gupta |
60 |
scheduledTasks.processScheme(LocalDateTime.now().minusDays(7), LocalDateTime.now(), false);
|
| 29673 |
manish |
61 |
|
|
|
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 {
|
| 29673 |
manish |
69 |
|
|
|
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();
|
| 29673 |
manish |
76 |
|
|
|
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 |
|
|
|
105 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
106 |
|
| 23929 |
amit.gupta |
107 |
scheduledTasks.sendPartnerInvestmentDetails();
|
| 29673 |
manish |
108 |
|
|
|
109 |
propertiesDetails.put("sendPartnerInvestmentDetails", "1");
|
|
|
110 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
111 |
|
| 25893 |
amit.gupta |
112 |
}
|
| 28921 |
tejbeer |
113 |
|
| 28632 |
amit.gupta |
114 |
@Scheduled(cron = "0 0 10,15,17 * * *")
|
|
|
115 |
public void sendIndentTertiaryReport() throws Exception {
|
| 29673 |
manish |
116 |
|
|
|
117 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
118 |
propertiesDetails.put("sendIndentTertiaryReport", "0");
|
|
|
119 |
|
|
|
120 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
121 |
|
| 28632 |
amit.gupta |
122 |
scheduledTasks.sendIndentTertiary();
|
| 29673 |
manish |
123 |
|
|
|
124 |
propertiesDetails.put("sendIndentTertiaryReport", "1");
|
|
|
125 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
126 |
|
| 28632 |
amit.gupta |
127 |
}
|
| 28921 |
tejbeer |
128 |
|
| 28709 |
amit.gupta |
129 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
130 |
public void checkPartnerActiveStoreByStatus() throws Exception {
|
| 29673 |
manish |
131 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
132 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
|
|
|
133 |
|
|
|
134 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
135 |
|
|
|
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 {
|
| 29673 |
manish |
145 |
|
|
|
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();
|
| 29673 |
manish |
152 |
|
|
|
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();
|
| 29673 |
manish |
165 |
|
|
|
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);
|
| 29673 |
manish |
192 |
|
|
|
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 * * *")
|
|
|
204 |
public void processActivation() throws Exception {
|
| 29673 |
manish |
205 |
|
|
|
206 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
207 |
propertiesDetails.put("processActivation", "0");
|
|
|
208 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
209 |
|
| 27441 |
amit.gupta |
210 |
scheduledTasks.processActivation();
|
| 29673 |
manish |
211 |
|
|
|
212 |
propertiesDetails.put("processActivation", "1");
|
|
|
213 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
214 |
|
| 27441 |
amit.gupta |
215 |
}
|
| 25721 |
tejbeer |
216 |
|
| 26944 |
amit.gupta |
217 |
@Scheduled(cron = "0 */5 * * * *")
|
| 25300 |
tejbeer |
218 |
public void sendNotification() throws Throwable {
|
| 29673 |
manish |
219 |
|
|
|
220 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
221 |
propertiesDetails.put("sendNotification", "0");
|
|
|
222 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
223 |
|
| 25300 |
tejbeer |
224 |
scheduledTasks.sendNotification();
|
| 29673 |
manish |
225 |
propertiesDetails.put("sendNotification", "0");
|
|
|
226 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
227 |
|
| 25300 |
tejbeer |
228 |
}
|
| 28205 |
tejbeer |
229 |
|
| 28377 |
tejbeer |
230 |
@Scheduled(cron = "0 */15 * * * *")
|
|
|
231 |
public void checkRazorPayPaymentStatus() throws Throwable {
|
| 29673 |
manish |
232 |
|
|
|
233 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
234 |
propertiesDetails.put("checkRazorPayPaymentStatus", "0");
|
|
|
235 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
236 |
|
| 28377 |
tejbeer |
237 |
scheduledTasks.checkRazorPayPaymentStatus();
|
| 29673 |
manish |
238 |
propertiesDetails.put("checkRazorPayPaymentStatus", "1");
|
|
|
239 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
240 |
|
| 28377 |
tejbeer |
241 |
}
|
| 29673 |
manish |
242 |
|
| 28377 |
tejbeer |
243 |
|
| 27686 |
amit.gupta |
244 |
@Scheduled(cron = "0 */10 * * * *")
|
|
|
245 |
public void attachToffeeInvoices() throws Throwable {
|
| 29673 |
manish |
246 |
|
|
|
247 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
248 |
propertiesDetails.put("attachToffeeInvoices", "0");
|
|
|
249 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
250 |
|
| 27686 |
amit.gupta |
251 |
scheduledTasks.attachToffeeInvoices();
|
| 29673 |
manish |
252 |
|
|
|
253 |
propertiesDetails.put("attachToffeeInvoices", "1");
|
|
|
254 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
255 |
|
| 27686 |
amit.gupta |
256 |
}
|
| 24841 |
govind |
257 |
|
| 26283 |
tejbeer |
258 |
@Scheduled(cron = "0 0 5 * * *")
|
|
|
259 |
public void ticketClosed() throws Throwable {
|
|
|
260 |
|
| 29673 |
manish |
261 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
262 |
propertiesDetails.put("ticketClosed", "0");
|
|
|
263 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
264 |
|
| 26283 |
tejbeer |
265 |
scheduledTasks.ticketClosed();
|
| 29673 |
manish |
266 |
|
|
|
267 |
propertiesDetails.put("ticketClosed", "1");
|
|
|
268 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26283 |
tejbeer |
269 |
|
| 29673 |
manish |
270 |
|
| 26283 |
tejbeer |
271 |
}
|
|
|
272 |
|
| 29668 |
tejbeer |
273 |
@Scheduled(cron = "0 0 10 * * *")
|
| 25721 |
tejbeer |
274 |
public void checkfocusedModelInPartnerStock() throws Throwable {
|
|
|
275 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
276 |
|
|
|
277 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
278 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
|
|
|
279 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
280 |
|
| 25721 |
tejbeer |
281 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
| 29673 |
manish |
282 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
|
|
|
283 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 25721 |
tejbeer |
284 |
|
| 29673 |
manish |
285 |
|
| 25721 |
tejbeer |
286 |
log.info("endTime" + LocalDateTime.now());
|
|
|
287 |
}
|
| 28205 |
tejbeer |
288 |
|
| 26083 |
amit.gupta |
289 |
@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
|
| 25909 |
amit.gupta |
290 |
public void notifyLead() throws Throwable {
|
| 29673 |
manish |
291 |
|
|
|
292 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
293 |
propertiesDetails.put("notifyLead", "0");
|
|
|
294 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
295 |
|
| 25909 |
amit.gupta |
296 |
scheduledTasks.notifyLead();
|
| 29673 |
manish |
297 |
|
|
|
298 |
propertiesDetails.put("notifyLead", "1");
|
|
|
299 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
300 |
|
| 28205 |
tejbeer |
301 |
// scheduledTasks.notifyVisits();
|
| 25909 |
amit.gupta |
302 |
}
|
| 25721 |
tejbeer |
303 |
|
| 26214 |
amit.gupta |
304 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
305 |
public void fetchImeiActivation() throws Throwable {
|
| 29673 |
manish |
306 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
307 |
propertiesDetails.put("fetchImeiActivation", "0");
|
|
|
308 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
309 |
|
|
|
310 |
|
| 26408 |
amit.gupta |
311 |
runOnceTasks.fetchImeiActivation(0);
|
| 29673 |
manish |
312 |
|
|
|
313 |
propertiesDetails.put("fetchImeiActivation", "1");
|
|
|
314 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
315 |
|
| 26214 |
amit.gupta |
316 |
}
|
| 26790 |
tejbeer |
317 |
|
|
|
318 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
319 |
public void checkValidateReferral() throws Throwable {
|
|
|
320 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
321 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
322 |
propertiesDetails.put("checkValidateReferral", "0");
|
|
|
323 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
324 |
|
| 26790 |
tejbeer |
325 |
scheduledTasks.checkValidateReferral();
|
| 29673 |
manish |
326 |
|
|
|
327 |
propertiesDetails.put("checkValidateReferral", "1");
|
|
|
328 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26790 |
tejbeer |
329 |
|
| 29673 |
manish |
330 |
|
| 26790 |
tejbeer |
331 |
log.info("endTime" + LocalDateTime.now());
|
|
|
332 |
}
|
|
|
333 |
|
| 28921 |
tejbeer |
334 |
// @Scheduled(cron = "0 0 8 * * *")
|
| 28205 |
tejbeer |
335 |
public void partnerProblemAlert() throws Throwable {
|
|
|
336 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
337 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
338 |
propertiesDetails.put("partnerProblemAlert", "0");
|
|
|
339 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
340 |
|
| 28205 |
tejbeer |
341 |
scheduledTasks.partnerProblemAlert();
|
| 29673 |
manish |
342 |
propertiesDetails.put("partnerProblemAlert", "1");
|
|
|
343 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
344 |
|
| 28205 |
tejbeer |
345 |
log.info("endTime" + LocalDateTime.now());
|
|
|
346 |
}
|
| 28921 |
tejbeer |
347 |
|
| 28788 |
amit.gupta |
348 |
@Scheduled(cron = "0 30 10 * * MON-SAT")
|
| 28783 |
amit.gupta |
349 |
public void sendMorningAttendanceAlert() throws Throwable {
|
|
|
350 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
351 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
352 |
propertiesDetails.put("sendMorningAttendanceAlert", "0");
|
|
|
353 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
354 |
|
| 28783 |
amit.gupta |
355 |
scheduledTasks.sendAttendanceMorningAlert();
|
| 29673 |
manish |
356 |
propertiesDetails.put("sendMorningAttendanceAlert", "1");
|
|
|
357 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
358 |
|
| 28783 |
amit.gupta |
359 |
log.info("endTime" + LocalDateTime.now());
|
|
|
360 |
}
|
| 28921 |
tejbeer |
361 |
|
| 28788 |
amit.gupta |
362 |
@Scheduled(cron = "0 30 20 * * MON-SAT")
|
| 28783 |
amit.gupta |
363 |
public void sendEveningAttendanceAlert() throws Throwable {
|
|
|
364 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
365 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
366 |
propertiesDetails.put("sendEveningAttendanceAlert", "0");
|
|
|
367 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
368 |
|
| 28783 |
amit.gupta |
369 |
scheduledTasks.sendAttendanceEveningAlert();
|
| 29673 |
manish |
370 |
propertiesDetails.put("sendEveningAttendanceAlert", "1");
|
|
|
371 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
372 |
|
| 28783 |
amit.gupta |
373 |
log.info("endTime" + LocalDateTime.now());
|
|
|
374 |
}
|
| 28921 |
tejbeer |
375 |
|
|
|
376 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
377 |
public void onboardingEventDelays() throws Throwable {
|
|
|
378 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
379 |
|
|
|
380 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
381 |
propertiesDetails.put("onboardingEventDelays", "0");
|
|
|
382 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
383 |
|
| 28921 |
tejbeer |
384 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
| 29673 |
manish |
385 |
|
|
|
386 |
propertiesDetails.put("onboardingEventDelays", "1");
|
|
|
387 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
388 |
|
| 28921 |
tejbeer |
389 |
log.info("endTime" + LocalDateTime.now());
|
|
|
390 |
}
|
|
|
391 |
|
|
|
392 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
393 |
public void brandingAlert() throws Throwable {
|
|
|
394 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
395 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
396 |
propertiesDetails.put("brandingAlert", "0");
|
|
|
397 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
398 |
|
| 28921 |
tejbeer |
399 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
| 29673 |
manish |
400 |
propertiesDetails.put("brandingAlert", "1");
|
|
|
401 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
402 |
|
| 28921 |
tejbeer |
403 |
log.info("endTime" + LocalDateTime.now());
|
|
|
404 |
}
|
|
|
405 |
|
|
|
406 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
407 |
public void advancePaymentPendingAlert() throws Throwable {
|
|
|
408 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
409 |
|
|
|
410 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
411 |
propertiesDetails.put("advancePaymentPendingAlert", "0");
|
|
|
412 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
413 |
|
| 28921 |
tejbeer |
414 |
onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
| 29673 |
manish |
415 |
propertiesDetails.put("advancePaymentPendingAlert", "1");
|
|
|
416 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
417 |
|
| 28921 |
tejbeer |
418 |
log.info("endTime" + LocalDateTime.now());
|
|
|
419 |
}
|
|
|
420 |
|
|
|
421 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
422 |
public void fullPaymentPendingAlert() throws Throwable {
|
|
|
423 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
424 |
|
|
|
425 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
426 |
propertiesDetails.put("fullPaymentPendingAlert", "0");
|
|
|
427 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
428 |
|
| 28921 |
tejbeer |
429 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
| 29673 |
manish |
430 |
|
|
|
431 |
propertiesDetails.put("fullPaymentPendingAlert", "1");
|
|
|
432 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
433 |
|
| 28921 |
tejbeer |
434 |
log.info("endTime" + LocalDateTime.now());
|
|
|
435 |
}
|
|
|
436 |
|
| 28963 |
tejbeer |
437 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
438 |
public void advancePaymentPendinglegalAlert() throws Throwable {
|
|
|
439 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
440 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
441 |
propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
|
|
|
442 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
443 |
|
| 28963 |
tejbeer |
444 |
onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
| 29673 |
manish |
445 |
|
|
|
446 |
propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
|
|
|
447 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
448 |
|
| 28963 |
tejbeer |
449 |
log.info("endTime" + LocalDateTime.now());
|
|
|
450 |
}
|
|
|
451 |
|
| 29035 |
tejbeer |
452 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
453 |
public void onBoardingCompleteEventEmail() throws Throwable {
|
|
|
454 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
455 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
456 |
propertiesDetails.put("onBoardingCompleteEventEmail", "0");
|
|
|
457 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
458 |
|
| 29035 |
tejbeer |
459 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
| 29673 |
manish |
460 |
propertiesDetails.put("onBoardingCompleteEventEmail", "1");
|
|
|
461 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
462 |
|
| 29035 |
tejbeer |
463 |
log.info("endTime" + LocalDateTime.now());
|
|
|
464 |
}
|
| 29040 |
tejbeer |
465 |
|
| 29255 |
tejbeer |
466 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
467 |
public void storeTimelinePromoterPending() throws Throwable {
|
|
|
468 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
469 |
|
|
|
470 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
471 |
propertiesDetails.put("storeTimelinePromoterPending", "0");
|
|
|
472 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
473 |
|
| 29255 |
tejbeer |
474 |
onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
| 29673 |
manish |
475 |
propertiesDetails.put("storeTimelinePromoterPending", "1");
|
|
|
476 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
477 |
|
| 29255 |
tejbeer |
478 |
log.info("endTime" + LocalDateTime.now());
|
|
|
479 |
}
|
| 29668 |
tejbeer |
480 |
|
| 29467 |
amit.gupta |
481 |
@Scheduled(cron = "0 0 23 * * *")
|
| 29492 |
manish |
482 |
public void checkItelImeiActivation() throws Throwable {
|
|
|
483 |
log.info("startTime" + LocalDate.now());
|
| 29673 |
manish |
484 |
|
|
|
485 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
486 |
propertiesDetails.put("checkItelImeiActivation", "0");
|
|
|
487 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
488 |
|
| 29668 |
tejbeer |
489 |
scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
|
| 29673 |
manish |
490 |
|
|
|
491 |
propertiesDetails.put("checkItelImeiActivation", "1");
|
|
|
492 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
493 |
|
|
|
494 |
|
|
|
495 |
scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
|
|
|
496 |
|
| 29492 |
manish |
497 |
}
|
| 29668 |
tejbeer |
498 |
|
| 29492 |
manish |
499 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
500 |
public void checkTecnoImeiActivation() throws Throwable {
|
| 29673 |
manish |
501 |
|
|
|
502 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
503 |
propertiesDetails.put("checkTecnoImeiActivation", "0");
|
|
|
504 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
505 |
|
| 29492 |
manish |
506 |
log.info("startTime" + LocalDate.now());
|
| 29673 |
manish |
507 |
|
| 29668 |
tejbeer |
508 |
scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
|
| 29673 |
manish |
509 |
|
|
|
510 |
propertiesDetails.put("checkTecnoImeiActivation", "1");
|
|
|
511 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
512 |
scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
|
|
|
513 |
|
| 29492 |
manish |
514 |
}
|
| 29668 |
tejbeer |
515 |
|
| 29492 |
manish |
516 |
@Scheduled(cron = "0 0 23 * * *")
|
| 29457 |
manish |
517 |
public void vivoImeiActivation() throws Throwable {
|
|
|
518 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
519 |
|
|
|
520 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
521 |
propertiesDetails.put("vivoImeiActivation", "0");
|
|
|
522 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
523 |
|
| 29457 |
manish |
524 |
scheduledTasks.checkImeiActivation();
|
|
|
525 |
log.info("endTime" + LocalDateTime.now());
|
| 29673 |
manish |
526 |
propertiesDetails.put("vivoImeiActivation", "1");
|
|
|
527 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
528 |
|
| 29457 |
manish |
529 |
}
|
| 29255 |
tejbeer |
530 |
|
| 29316 |
tejbeer |
531 |
@Scheduled(cron = "0 0 * * * *")
|
| 29308 |
tejbeer |
532 |
public void markDelhiveryOrderDelivered() throws Throwable {
|
| 29673 |
manish |
533 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
534 |
propertiesDetails.put("markDelhiveryOrderDelivered", "0");
|
|
|
535 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
536 |
|
| 29308 |
tejbeer |
537 |
log.info("startTime" + LocalDateTime.now());
|
|
|
538 |
scheduledTasks.markDelhiveryOrderDelivered();
|
| 29673 |
manish |
539 |
propertiesDetails.put("markDelhiveryOrderDelivered", "1");
|
|
|
540 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
541 |
|
| 29308 |
tejbeer |
542 |
log.info("endTime" + LocalDateTime.now());
|
|
|
543 |
}
|
|
|
544 |
|
| 29208 |
tejbeer |
545 |
/*
|
|
|
546 |
* @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
|
|
|
547 |
* throws Throwable { log.info("startTime" + LocalDateTime.now());
|
|
|
548 |
* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
549 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
550 |
*/
|
| 23756 |
amit.gupta |
551 |
}
|