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