| 23756 |
amit.gupta |
1 |
package com.smartdukaan.cron.scheduled;
|
|
|
2 |
|
| 30049 |
amit.gupta |
3 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
|
|
4 |
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
|
|
|
5 |
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
|
|
|
6 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 23756 |
amit.gupta |
7 |
import org.apache.logging.log4j.LogManager;
|
|
|
8 |
import org.apache.logging.log4j.Logger;
|
|
|
9 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
10 |
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
11 |
import org.springframework.stereotype.Component;
|
|
|
12 |
|
| 30049 |
amit.gupta |
13 |
import java.time.LocalDate;
|
|
|
14 |
import java.time.LocalDateTime;
|
|
|
15 |
import java.util.Date;
|
|
|
16 |
import java.util.LinkedHashMap;
|
| 23756 |
amit.gupta |
17 |
|
|
|
18 |
@Component
|
|
|
19 |
public class ScheduledSkeleton {
|
| 23794 |
govind |
20 |
|
| 23756 |
amit.gupta |
21 |
private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
|
|
|
22 |
|
|
|
23 |
@Autowired
|
| 24784 |
amit.gupta |
24 |
private ScheduledTasks scheduledTasks;
|
| 28205 |
tejbeer |
25 |
|
| 27007 |
amit.gupta |
26 |
@Autowired
|
|
|
27 |
private LeadSyncRunner leadSyncRunner;
|
| 24841 |
govind |
28 |
|
| 24784 |
amit.gupta |
29 |
@Autowired
|
|
|
30 |
private Reconciliation reconciliation;
|
| 25822 |
amit.gupta |
31 |
|
| 25782 |
amit.gupta |
32 |
@Autowired
|
|
|
33 |
private RunOnceTasks runOnceTasks;
|
| 23756 |
amit.gupta |
34 |
|
|
|
35 |
@Autowired
|
|
|
36 |
NagiosMonitorTasks nagiosMonitorTasks;
|
| 24188 |
govind |
37 |
|
| 24135 |
govind |
38 |
@Autowired
|
| 24841 |
govind |
39 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
|
|
40 |
|
| 28921 |
tejbeer |
41 |
@Autowired
|
|
|
42 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
|
|
43 |
|
| 29673 |
manish |
44 |
@Autowired
|
|
|
45 |
private WriteToPropertiesFile writeToPropertiesFile;
|
|
|
46 |
|
| 29674 |
manish |
47 |
String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
|
| 29757 |
tejbeer |
48 |
|
| 30049 |
amit.gupta |
49 |
@Scheduled(cron = "0 0 2 * * *")
|
| 24420 |
amit.gupta |
50 |
public void processDailySchemes() throws Exception {
|
| 29757 |
tejbeer |
51 |
|
| 29673 |
manish |
52 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
53 |
propertiesDetails.put("processDailySchemes", "0");
|
|
|
54 |
|
|
|
55 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 30049 |
amit.gupta |
56 |
int maxMinusDays = 5;
|
|
|
57 |
int currentDayOfMonth = LocalDate.now().getDayOfMonth();
|
|
|
58 |
int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
|
|
|
59 |
if (minusDays > 0) {
|
|
|
60 |
scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
|
|
|
61 |
}
|
| 29673 |
manish |
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 {
|
| 29757 |
tejbeer |
69 |
|
| 29673 |
manish |
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();
|
| 29757 |
tejbeer |
76 |
|
| 29673 |
manish |
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 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 23929 |
amit.gupta |
105 |
scheduledTasks.sendPartnerInvestmentDetails();
|
| 29757 |
tejbeer |
106 |
long secs = (new Date().getTime()) / 1000;
|
| 29696 |
manish |
107 |
log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
|
| 29757 |
tejbeer |
108 |
|
| 29695 |
manish |
109 |
propertiesDetails.put("investmentDate", Long.toString(secs));
|
| 29673 |
manish |
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 {
|
| 29757 |
tejbeer |
117 |
|
| 29673 |
manish |
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();
|
| 29757 |
tejbeer |
124 |
|
| 29673 |
manish |
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 |
|
| 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 {
|
| 29757 |
tejbeer |
145 |
|
| 29673 |
manish |
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();
|
| 29757 |
tejbeer |
152 |
|
| 29673 |
manish |
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();
|
| 29757 |
tejbeer |
165 |
|
| 29673 |
manish |
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);
|
| 29757 |
tejbeer |
192 |
|
| 29673 |
manish |
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 * * *")
|
| 29801 |
manish |
204 |
public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
|
|
|
205 |
log.info("selectFinServiceFollowUpDateByCurrDate");
|
|
|
206 |
scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
|
| 30049 |
amit.gupta |
207 |
|
| 29801 |
manish |
208 |
}
|
| 30049 |
amit.gupta |
209 |
|
| 29801 |
manish |
210 |
@Scheduled(cron = "0 0 1 * * *")
|
| 27441 |
amit.gupta |
211 |
public void processActivation() throws Exception {
|
| 29757 |
tejbeer |
212 |
|
| 29673 |
manish |
213 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
214 |
propertiesDetails.put("processActivation", "0");
|
|
|
215 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
216 |
|
| 27441 |
amit.gupta |
217 |
scheduledTasks.processActivation();
|
| 29757 |
tejbeer |
218 |
|
| 29673 |
manish |
219 |
propertiesDetails.put("processActivation", "1");
|
|
|
220 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
221 |
|
| 27441 |
amit.gupta |
222 |
}
|
| 25721 |
tejbeer |
223 |
|
| 26944 |
amit.gupta |
224 |
@Scheduled(cron = "0 */5 * * * *")
|
| 25300 |
tejbeer |
225 |
public void sendNotification() throws Throwable {
|
| 29757 |
tejbeer |
226 |
|
| 29674 |
manish |
227 |
log.info("send Notification");
|
| 29673 |
manish |
228 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
229 |
propertiesDetails.put("sendNotification", "0");
|
|
|
230 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
231 |
|
| 25300 |
tejbeer |
232 |
scheduledTasks.sendNotification();
|
| 29693 |
manish |
233 |
propertiesDetails.put("sendNotification", "1");
|
| 29673 |
manish |
234 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29674 |
manish |
235 |
log.info("send Notification Done");
|
| 29673 |
manish |
236 |
|
| 25300 |
tejbeer |
237 |
}
|
| 28205 |
tejbeer |
238 |
|
| 28377 |
tejbeer |
239 |
@Scheduled(cron = "0 */15 * * * *")
|
|
|
240 |
public void checkRazorPayPaymentStatus() throws Throwable {
|
| 29757 |
tejbeer |
241 |
|
| 29673 |
manish |
242 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
243 |
propertiesDetails.put("checkRazorPayPaymentStatus", "0");
|
|
|
244 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
245 |
|
| 28377 |
tejbeer |
246 |
scheduledTasks.checkRazorPayPaymentStatus();
|
| 29673 |
manish |
247 |
propertiesDetails.put("checkRazorPayPaymentStatus", "1");
|
|
|
248 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
249 |
|
| 28377 |
tejbeer |
250 |
}
|
|
|
251 |
|
| 30401 |
amit.gupta |
252 |
@Scheduled(fixedDelay = 30 * 60 * 1000)
|
| 30321 |
amit.gupta |
253 |
public void updateIrnsToInvoices() throws Throwable {
|
|
|
254 |
runOnceTasks.updateIrnsToInvoices();
|
|
|
255 |
}
|
|
|
256 |
|
| 27686 |
amit.gupta |
257 |
@Scheduled(cron = "0 */10 * * * *")
|
|
|
258 |
public void attachToffeeInvoices() throws Throwable {
|
| 29757 |
tejbeer |
259 |
|
| 29673 |
manish |
260 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
261 |
propertiesDetails.put("attachToffeeInvoices", "0");
|
|
|
262 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
263 |
|
| 27686 |
amit.gupta |
264 |
scheduledTasks.attachToffeeInvoices();
|
| 29757 |
tejbeer |
265 |
|
| 29673 |
manish |
266 |
propertiesDetails.put("attachToffeeInvoices", "1");
|
|
|
267 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
268 |
|
| 27686 |
amit.gupta |
269 |
}
|
| 24841 |
govind |
270 |
|
| 26283 |
tejbeer |
271 |
@Scheduled(cron = "0 0 5 * * *")
|
|
|
272 |
public void ticketClosed() throws Throwable {
|
|
|
273 |
|
| 29673 |
manish |
274 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
275 |
propertiesDetails.put("ticketClosed", "0");
|
|
|
276 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
277 |
|
| 26283 |
tejbeer |
278 |
scheduledTasks.ticketClosed();
|
| 29757 |
tejbeer |
279 |
|
| 29673 |
manish |
280 |
propertiesDetails.put("ticketClosed", "1");
|
|
|
281 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26283 |
tejbeer |
282 |
|
|
|
283 |
}
|
|
|
284 |
|
| 29757 |
tejbeer |
285 |
@Scheduled(cron = "0 0 8 * * *")
|
| 25721 |
tejbeer |
286 |
public void checkfocusedModelInPartnerStock() throws Throwable {
|
|
|
287 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
288 |
|
| 29673 |
manish |
289 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
290 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
|
|
|
291 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
292 |
|
| 25721 |
tejbeer |
293 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
| 29673 |
manish |
294 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
|
|
|
295 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 25721 |
tejbeer |
296 |
|
|
|
297 |
log.info("endTime" + LocalDateTime.now());
|
|
|
298 |
}
|
| 28205 |
tejbeer |
299 |
|
| 26083 |
amit.gupta |
300 |
@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
|
| 25909 |
amit.gupta |
301 |
public void notifyLead() throws Throwable {
|
| 29757 |
tejbeer |
302 |
|
| 29673 |
manish |
303 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
304 |
propertiesDetails.put("notifyLead", "0");
|
|
|
305 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
306 |
|
| 25909 |
amit.gupta |
307 |
scheduledTasks.notifyLead();
|
| 29757 |
tejbeer |
308 |
|
| 29673 |
manish |
309 |
propertiesDetails.put("notifyLead", "1");
|
|
|
310 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
311 |
|
| 28205 |
tejbeer |
312 |
// scheduledTasks.notifyVisits();
|
| 25909 |
amit.gupta |
313 |
}
|
| 25721 |
tejbeer |
314 |
|
| 26214 |
amit.gupta |
315 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
316 |
public void fetchImeiActivation() throws Throwable {
|
| 29673 |
manish |
317 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
318 |
propertiesDetails.put("fetchImeiActivation", "0");
|
|
|
319 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
320 |
|
| 26408 |
amit.gupta |
321 |
runOnceTasks.fetchImeiActivation(0);
|
| 29757 |
tejbeer |
322 |
|
| 29673 |
manish |
323 |
propertiesDetails.put("fetchImeiActivation", "1");
|
|
|
324 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
325 |
|
| 26214 |
amit.gupta |
326 |
}
|
| 26790 |
tejbeer |
327 |
|
|
|
328 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
329 |
public void checkValidateReferral() throws Throwable {
|
|
|
330 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
331 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
332 |
propertiesDetails.put("checkValidateReferral", "0");
|
|
|
333 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
334 |
|
| 26790 |
tejbeer |
335 |
scheduledTasks.checkValidateReferral();
|
| 29757 |
tejbeer |
336 |
|
| 29673 |
manish |
337 |
propertiesDetails.put("checkValidateReferral", "1");
|
|
|
338 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26790 |
tejbeer |
339 |
|
|
|
340 |
log.info("endTime" + LocalDateTime.now());
|
|
|
341 |
}
|
|
|
342 |
|
| 28921 |
tejbeer |
343 |
// @Scheduled(cron = "0 0 8 * * *")
|
| 28205 |
tejbeer |
344 |
public void partnerProblemAlert() throws Throwable {
|
|
|
345 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
346 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
347 |
propertiesDetails.put("partnerProblemAlert", "0");
|
|
|
348 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
349 |
|
| 28205 |
tejbeer |
350 |
scheduledTasks.partnerProblemAlert();
|
| 29673 |
manish |
351 |
propertiesDetails.put("partnerProblemAlert", "1");
|
|
|
352 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
353 |
|
| 28205 |
tejbeer |
354 |
log.info("endTime" + LocalDateTime.now());
|
|
|
355 |
}
|
| 28921 |
tejbeer |
356 |
|
| 28788 |
amit.gupta |
357 |
@Scheduled(cron = "0 30 10 * * MON-SAT")
|
| 28783 |
amit.gupta |
358 |
public void sendMorningAttendanceAlert() throws Throwable {
|
|
|
359 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
360 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
361 |
propertiesDetails.put("sendMorningAttendanceAlert", "0");
|
|
|
362 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
363 |
|
| 28783 |
amit.gupta |
364 |
scheduledTasks.sendAttendanceMorningAlert();
|
| 29673 |
manish |
365 |
propertiesDetails.put("sendMorningAttendanceAlert", "1");
|
|
|
366 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
367 |
|
| 28783 |
amit.gupta |
368 |
log.info("endTime" + LocalDateTime.now());
|
|
|
369 |
}
|
| 28921 |
tejbeer |
370 |
|
| 28788 |
amit.gupta |
371 |
@Scheduled(cron = "0 30 20 * * MON-SAT")
|
| 28783 |
amit.gupta |
372 |
public void sendEveningAttendanceAlert() throws Throwable {
|
|
|
373 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
374 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
375 |
propertiesDetails.put("sendEveningAttendanceAlert", "0");
|
|
|
376 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
377 |
|
| 28783 |
amit.gupta |
378 |
scheduledTasks.sendAttendanceEveningAlert();
|
| 29673 |
manish |
379 |
propertiesDetails.put("sendEveningAttendanceAlert", "1");
|
|
|
380 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
381 |
|
| 28783 |
amit.gupta |
382 |
log.info("endTime" + LocalDateTime.now());
|
|
|
383 |
}
|
| 28921 |
tejbeer |
384 |
|
|
|
385 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
386 |
public void onboardingEventDelays() throws Throwable {
|
|
|
387 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
388 |
|
| 29673 |
manish |
389 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
390 |
propertiesDetails.put("onboardingEventDelays", "0");
|
|
|
391 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
392 |
|
| 28921 |
tejbeer |
393 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
| 29757 |
tejbeer |
394 |
|
| 29673 |
manish |
395 |
propertiesDetails.put("onboardingEventDelays", "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 brandingAlert() throws Throwable {
|
|
|
403 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
404 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
405 |
propertiesDetails.put("brandingAlert", "0");
|
|
|
406 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
407 |
|
| 28921 |
tejbeer |
408 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
| 29673 |
manish |
409 |
propertiesDetails.put("brandingAlert", "1");
|
|
|
410 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
411 |
|
| 28921 |
tejbeer |
412 |
log.info("endTime" + LocalDateTime.now());
|
|
|
413 |
}
|
|
|
414 |
|
|
|
415 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
416 |
public void advancePaymentPendingAlert() throws Throwable {
|
|
|
417 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
418 |
|
| 29673 |
manish |
419 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
420 |
propertiesDetails.put("advancePaymentPendingAlert", "0");
|
|
|
421 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
422 |
|
| 28921 |
tejbeer |
423 |
onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
| 29673 |
manish |
424 |
propertiesDetails.put("advancePaymentPendingAlert", "1");
|
|
|
425 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
426 |
|
| 28921 |
tejbeer |
427 |
log.info("endTime" + LocalDateTime.now());
|
|
|
428 |
}
|
|
|
429 |
|
|
|
430 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
431 |
public void fullPaymentPendingAlert() throws Throwable {
|
|
|
432 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
433 |
|
| 29673 |
manish |
434 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
435 |
propertiesDetails.put("fullPaymentPendingAlert", "0");
|
|
|
436 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
437 |
|
| 28921 |
tejbeer |
438 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
| 29757 |
tejbeer |
439 |
|
| 29673 |
manish |
440 |
propertiesDetails.put("fullPaymentPendingAlert", "1");
|
|
|
441 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
442 |
|
| 28921 |
tejbeer |
443 |
log.info("endTime" + LocalDateTime.now());
|
|
|
444 |
}
|
|
|
445 |
|
| 28963 |
tejbeer |
446 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
447 |
public void advancePaymentPendinglegalAlert() throws Throwable {
|
|
|
448 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
449 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
450 |
propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
|
|
|
451 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
452 |
|
| 28963 |
tejbeer |
453 |
onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
| 29757 |
tejbeer |
454 |
|
| 29673 |
manish |
455 |
propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
|
|
|
456 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
457 |
|
| 28963 |
tejbeer |
458 |
log.info("endTime" + LocalDateTime.now());
|
|
|
459 |
}
|
|
|
460 |
|
| 29035 |
tejbeer |
461 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
462 |
public void onBoardingCompleteEventEmail() throws Throwable {
|
|
|
463 |
log.info("startTime" + LocalDateTime.now());
|
| 29673 |
manish |
464 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
465 |
propertiesDetails.put("onBoardingCompleteEventEmail", "0");
|
|
|
466 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
467 |
|
| 29035 |
tejbeer |
468 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
| 29673 |
manish |
469 |
propertiesDetails.put("onBoardingCompleteEventEmail", "1");
|
|
|
470 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
471 |
|
| 29035 |
tejbeer |
472 |
log.info("endTime" + LocalDateTime.now());
|
|
|
473 |
}
|
| 29040 |
tejbeer |
474 |
|
| 30390 |
amit.gupta |
475 |
@Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
|
|
|
476 |
public void fetchPartnerStat() throws Throwable {
|
|
|
477 |
scheduledTasks.fetchParnterStats();
|
|
|
478 |
}
|
|
|
479 |
|
| 29255 |
tejbeer |
480 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
481 |
public void storeTimelinePromoterPending() throws Throwable {
|
|
|
482 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
483 |
|
| 29673 |
manish |
484 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
485 |
propertiesDetails.put("storeTimelinePromoterPending", "0");
|
|
|
486 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
487 |
|
| 29255 |
tejbeer |
488 |
onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
| 29673 |
manish |
489 |
propertiesDetails.put("storeTimelinePromoterPending", "1");
|
|
|
490 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
491 |
|
| 29255 |
tejbeer |
492 |
log.info("endTime" + LocalDateTime.now());
|
|
|
493 |
}
|
| 29668 |
tejbeer |
494 |
|
| 29467 |
amit.gupta |
495 |
@Scheduled(cron = "0 0 23 * * *")
|
| 29492 |
manish |
496 |
public void checkItelImeiActivation() throws Throwable {
|
|
|
497 |
log.info("startTime" + LocalDate.now());
|
| 29673 |
manish |
498 |
|
|
|
499 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
500 |
propertiesDetails.put("checkItelImeiActivation", "0");
|
|
|
501 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29694 |
manish |
502 |
log.info("startTimecheckItelImeiActivation" + LocalDate.now());
|
| 29668 |
tejbeer |
503 |
scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
|
| 29757 |
tejbeer |
504 |
long secs = (new Date().getTime()) / 1000;
|
| 29694 |
manish |
505 |
log.info("endTimecheckItelImeiActivation" + LocalDate.now());
|
| 29673 |
manish |
506 |
propertiesDetails.put("checkItelImeiActivation", "1");
|
| 29757 |
tejbeer |
507 |
propertiesDetails.put("itelDate", Long.toString(secs));
|
| 29673 |
manish |
508 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
509 |
|
| 29757 |
tejbeer |
510 |
}
|
| 29673 |
manish |
511 |
|
| 29492 |
manish |
512 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
513 |
public void checkTecnoImeiActivation() throws Throwable {
|
| 29757 |
tejbeer |
514 |
|
| 29673 |
manish |
515 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
516 |
propertiesDetails.put("checkTecnoImeiActivation", "0");
|
|
|
517 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
518 |
|
| 29492 |
manish |
519 |
log.info("startTime" + LocalDate.now());
|
| 29694 |
manish |
520 |
log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
|
| 29668 |
tejbeer |
521 |
scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
|
| 29694 |
manish |
522 |
log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
|
| 29757 |
tejbeer |
523 |
|
|
|
524 |
long secs = (new Date().getTime()) / 1000;
|
| 29673 |
manish |
525 |
propertiesDetails.put("checkTecnoImeiActivation", "1");
|
| 29691 |
manish |
526 |
propertiesDetails.put("technoDate", Long.toString(secs));
|
| 29673 |
manish |
527 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29757 |
tejbeer |
528 |
|
| 29492 |
manish |
529 |
}
|
| 29668 |
tejbeer |
530 |
|
| 30370 |
amit.gupta |
531 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 29457 |
manish |
532 |
public void vivoImeiActivation() throws Throwable {
|
| 29694 |
manish |
533 |
log.info("startTimevivoImeiActivation" + LocalDateTime.now());
|
| 29757 |
tejbeer |
534 |
|
| 29673 |
manish |
535 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
536 |
propertiesDetails.put("vivoImeiActivation", "0");
|
|
|
537 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
538 |
|
| 29457 |
manish |
539 |
scheduledTasks.checkImeiActivation();
|
| 29757 |
tejbeer |
540 |
long secs = (new Date().getTime()) / 1000;
|
| 29694 |
manish |
541 |
log.info("endTimevivoImeiActivation" + LocalDateTime.now());
|
| 29673 |
manish |
542 |
propertiesDetails.put("vivoImeiActivation", "1");
|
| 29757 |
tejbeer |
543 |
|
| 29691 |
manish |
544 |
propertiesDetails.put("vivoDate", Long.toString(secs));
|
| 29673 |
manish |
545 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
546 |
|
| 29457 |
manish |
547 |
}
|
| 29255 |
tejbeer |
548 |
|
| 30421 |
tejbeer |
549 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
550 |
public void reviewUncontactablePartner() throws Throwable {
|
|
|
551 |
log.info("startTime" + LocalDateTime.now());
|
|
|
552 |
|
|
|
553 |
scheduledTasks.reviewUncontactablePartner();
|
|
|
554 |
|
|
|
555 |
}
|
|
|
556 |
|
| 30352 |
amit.gupta |
557 |
@Autowired
|
|
|
558 |
private StandAlone standAlone;
|
|
|
559 |
|
| 30370 |
amit.gupta |
560 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 30352 |
amit.gupta |
561 |
public void oppo() throws Throwable {
|
|
|
562 |
standAlone.checkOppoImeiStatus();
|
|
|
563 |
}
|
|
|
564 |
|
| 29316 |
tejbeer |
565 |
@Scheduled(cron = "0 0 * * * *")
|
| 29308 |
tejbeer |
566 |
public void markDelhiveryOrderDelivered() throws Throwable {
|
| 29673 |
manish |
567 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
568 |
propertiesDetails.put("markDelhiveryOrderDelivered", "0");
|
|
|
569 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
570 |
|
| 29308 |
tejbeer |
571 |
log.info("startTime" + LocalDateTime.now());
|
|
|
572 |
scheduledTasks.markDelhiveryOrderDelivered();
|
| 29673 |
manish |
573 |
propertiesDetails.put("markDelhiveryOrderDelivered", "1");
|
|
|
574 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
575 |
|
| 29308 |
tejbeer |
576 |
log.info("endTime" + LocalDateTime.now());
|
|
|
577 |
}
|
|
|
578 |
|
| 29208 |
tejbeer |
579 |
/*
|
|
|
580 |
* @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
|
|
|
581 |
* throws Throwable { log.info("startTime" + LocalDateTime.now());
|
|
|
582 |
* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
583 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
584 |
*/
|
| 23756 |
amit.gupta |
585 |
}
|