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