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