| 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;
|
| 34948 |
ranu |
6 |
import com.smartdukaan.cron.scheduled.ambreports.AbmReportSender;
|
| 30049 |
amit.gupta |
7 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 32832 |
amit.gupta |
8 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
| 32907 |
amit.gupta |
9 |
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
|
| 34443 |
vikas.jang |
10 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 34241 |
tejus.loha |
11 |
import com.spice.profitmandi.dao.service.PurSaleService;
|
| 23756 |
amit.gupta |
12 |
import org.apache.logging.log4j.LogManager;
|
|
|
13 |
import org.apache.logging.log4j.Logger;
|
|
|
14 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
15 |
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
16 |
import org.springframework.stereotype.Component;
|
|
|
17 |
|
| 30049 |
amit.gupta |
18 |
import java.time.LocalDate;
|
|
|
19 |
import java.time.LocalDateTime;
|
| 34756 |
amit.gupta |
20 |
import java.time.LocalTime;
|
| 30049 |
amit.gupta |
21 |
import java.util.Date;
|
|
|
22 |
import java.util.LinkedHashMap;
|
| 23756 |
amit.gupta |
23 |
|
|
|
24 |
@Component
|
| 30887 |
amit.gupta |
25 |
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
|
| 23756 |
amit.gupta |
26 |
public class ScheduledSkeleton {
|
| 23794 |
govind |
27 |
|
| 32048 |
tejbeer |
28 |
private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
|
| 23756 |
amit.gupta |
29 |
|
| 32048 |
tejbeer |
30 |
@Autowired
|
|
|
31 |
private ScheduledTasks scheduledTasks;
|
| 28205 |
tejbeer |
32 |
|
| 32048 |
tejbeer |
33 |
@Autowired
|
| 34321 |
ranu |
34 |
private ScheduledTasksTest scheduledTasksTest;
|
|
|
35 |
|
|
|
36 |
@Autowired
|
| 34948 |
ranu |
37 |
private AbmReportSender abmReportSender;
|
|
|
38 |
|
|
|
39 |
@Autowired
|
| 32048 |
tejbeer |
40 |
private LeadSyncRunner leadSyncRunner;
|
| 24841 |
govind |
41 |
|
| 32048 |
tejbeer |
42 |
@Autowired
|
|
|
43 |
private Reconciliation reconciliation;
|
| 25822 |
amit.gupta |
44 |
|
| 32048 |
tejbeer |
45 |
@Autowired
|
|
|
46 |
private RunOnceTasks runOnceTasks;
|
| 23756 |
amit.gupta |
47 |
|
| 32048 |
tejbeer |
48 |
@Autowired
|
|
|
49 |
NagiosMonitorTasks nagiosMonitorTasks;
|
| 24188 |
govind |
50 |
|
| 32048 |
tejbeer |
51 |
@Autowired
|
|
|
52 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
| 24841 |
govind |
53 |
|
| 32048 |
tejbeer |
54 |
@Autowired
|
|
|
55 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
| 28921 |
tejbeer |
56 |
|
| 32048 |
tejbeer |
57 |
@Autowired
|
|
|
58 |
private WriteToPropertiesFile writeToPropertiesFile;
|
| 29673 |
manish |
59 |
|
| 32048 |
tejbeer |
60 |
String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
|
| 29757 |
tejbeer |
61 |
|
| 32048 |
tejbeer |
62 |
@Scheduled(cron = "0 0 2 * * *")
|
|
|
63 |
public void processDailySchemes() throws Exception {
|
| 29757 |
tejbeer |
64 |
|
| 32048 |
tejbeer |
65 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
66 |
propertiesDetails.put("processDailySchemes", "0");
|
| 29673 |
manish |
67 |
|
| 32048 |
tejbeer |
68 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
69 |
int maxMinusDays = 5;
|
|
|
70 |
int currentDayOfMonth = LocalDate.now().getDayOfMonth();
|
|
|
71 |
int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
|
|
|
72 |
if (minusDays > 0) {
|
|
|
73 |
scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
|
|
|
74 |
}
|
|
|
75 |
propertiesDetails.put("processDailySchemes", "1");
|
|
|
76 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
77 |
|
| 32048 |
tejbeer |
78 |
}
|
| 24841 |
govind |
79 |
|
| 32048 |
tejbeer |
80 |
@Scheduled(cron = "0 15 0 * * *")
|
|
|
81 |
public void runOnceTasks() throws Exception {
|
| 29757 |
tejbeer |
82 |
|
| 32048 |
tejbeer |
83 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
84 |
propertiesDetails.put("runOnceTasks", "0");
|
| 29673 |
manish |
85 |
|
| 32048 |
tejbeer |
86 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
87 |
|
| 32048 |
tejbeer |
88 |
scheduledTasks.reconcileRecharge();
|
| 29757 |
tejbeer |
89 |
|
| 32048 |
tejbeer |
90 |
propertiesDetails.put("runOnceTasks", "1");
|
|
|
91 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
92 |
}
|
| 25822 |
amit.gupta |
93 |
|
| 32048 |
tejbeer |
94 |
/*
|
|
|
95 |
* @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
|
|
|
96 |
* throws Exception { runOnceTasks.mailDashboardScreenshots(); }
|
|
|
97 |
*/
|
| 25721 |
tejbeer |
98 |
|
| 32048 |
tejbeer |
99 |
@Scheduled(cron = "0 05 0 1,16 * ?")
|
|
|
100 |
public void processRechargeCashback() throws Throwable {
|
| 29673 |
manish |
101 |
|
| 32048 |
tejbeer |
102 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
103 |
propertiesDetails.put("processRechargeCashback", "0");
|
| 29673 |
manish |
104 |
|
| 32048 |
tejbeer |
105 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
106 |
scheduledTasks.processRechargeCashback();
|
| 29673 |
manish |
107 |
|
| 32048 |
tejbeer |
108 |
propertiesDetails.put("processRechargeCashback", "1");
|
|
|
109 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
110 |
|
| 32048 |
tejbeer |
111 |
}
|
| 23794 |
govind |
112 |
|
| 32048 |
tejbeer |
113 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
114 |
public void sendPartnerInvestmentDetails() throws Exception {
|
|
|
115 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
116 |
propertiesDetails.put("sendPartnerInvestmentDetails", "0");
|
|
|
117 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
118 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
119 |
long secs = (new Date().getTime()) / 1000;
|
|
|
120 |
log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
|
| 29757 |
tejbeer |
121 |
|
| 32048 |
tejbeer |
122 |
propertiesDetails.put("investmentDate", Long.toString(secs));
|
|
|
123 |
propertiesDetails.put("sendPartnerInvestmentDetails", "1");
|
|
|
124 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
125 |
|
| 32048 |
tejbeer |
126 |
}
|
| 28921 |
tejbeer |
127 |
|
| 34725 |
ranu |
128 |
@Scheduled(cron = "0 30 6 * * *")
|
| 34648 |
ranu |
129 |
public void generateBiReport() throws Exception {
|
|
|
130 |
scheduledTasksTest.generateBiReport();
|
|
|
131 |
}
|
| 34939 |
ranu |
132 |
@Scheduled(cron = "0 30 4 * * *")
|
|
|
133 |
public void createFofoSmartCartSuggestion() throws Exception {
|
|
|
134 |
scheduledTasksTest.createFofoSmartCartSuggestion();
|
|
|
135 |
}
|
| 35133 |
ranu |
136 |
@Scheduled(cron = "0 0 6,22 * * *")
|
| 34948 |
ranu |
137 |
public void sendAbmSmartCartReport() throws Exception {
|
|
|
138 |
abmReportSender.sendAbmSmartCartReport();
|
|
|
139 |
}
|
| 34648 |
ranu |
140 |
|
| 32048 |
tejbeer |
141 |
@Scheduled(cron = "0 0 10,15,17 * * *")
|
|
|
142 |
public void sendIndentTertiaryReport() throws Exception {
|
| 29757 |
tejbeer |
143 |
|
| 32048 |
tejbeer |
144 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
145 |
propertiesDetails.put("sendIndentTertiaryReport", "0");
|
| 29673 |
manish |
146 |
|
| 32048 |
tejbeer |
147 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
148 |
|
| 32048 |
tejbeer |
149 |
scheduledTasks.sendIndentTertiary();
|
| 29757 |
tejbeer |
150 |
|
| 32048 |
tejbeer |
151 |
propertiesDetails.put("sendIndentTertiaryReport", "1");
|
|
|
152 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
153 |
|
| 32048 |
tejbeer |
154 |
}
|
| 28921 |
tejbeer |
155 |
|
| 32048 |
tejbeer |
156 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
157 |
public void checkPartnerActiveStoreByStatus() throws Exception {
|
|
|
158 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
159 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
|
| 29673 |
manish |
160 |
|
| 32048 |
tejbeer |
161 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
162 |
|
| 32048 |
tejbeer |
163 |
scheduledTasks.checkPartnerActiveStore();
|
|
|
164 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
|
|
|
165 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
166 |
|
| 32048 |
tejbeer |
167 |
}
|
| 26790 |
tejbeer |
168 |
|
| 32048 |
tejbeer |
169 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
170 |
public void sendStockAgeingReport() throws Throwable {
|
| 29757 |
tejbeer |
171 |
|
| 32048 |
tejbeer |
172 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
173 |
propertiesDetails.put("sendStockAgeingReport", "0");
|
| 29673 |
manish |
174 |
|
| 32048 |
tejbeer |
175 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
176 |
|
| 32048 |
tejbeer |
177 |
scheduledTasks.sendAgeingReport();
|
| 29757 |
tejbeer |
178 |
|
| 32048 |
tejbeer |
179 |
propertiesDetails.put("sendStockAgeingReport", "1");
|
|
|
180 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
181 |
|
| 32048 |
tejbeer |
182 |
}
|
| 24131 |
govind |
183 |
|
| 32048 |
tejbeer |
184 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
185 |
public void escalateTicket() throws Exception {
|
|
|
186 |
log.info("escalate ticket");
|
|
|
187 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
188 |
propertiesDetails.put("escalateTicket", "0");
|
|
|
189 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
190 |
ticketRelatedScheduledTask.escalateTicket();
|
| 29757 |
tejbeer |
191 |
|
| 32048 |
tejbeer |
192 |
propertiesDetails.put("escalateTicket", "1");
|
|
|
193 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
194 |
|
| 32048 |
tejbeer |
195 |
}
|
| 24841 |
govind |
196 |
|
| 32048 |
tejbeer |
197 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
198 |
public void alertTicketToUser() throws Exception {
|
|
|
199 |
log.info("alert for ticket");
|
|
|
200 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
201 |
propertiesDetails.put("alertTicketToUser", "0");
|
|
|
202 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
203 |
|
| 32048 |
tejbeer |
204 |
ticketRelatedScheduledTask.alertforTicket();
|
|
|
205 |
propertiesDetails.put("alertTicketToUser", "1");
|
|
|
206 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
207 |
|
| 32048 |
tejbeer |
208 |
}
|
| 24841 |
govind |
209 |
|
| 34904 |
ranu |
210 |
//@Scheduled(cron = "0 0 14,18,23 ? * *")
|
| 32048 |
tejbeer |
211 |
public void dailySaleNotification() throws Exception {
|
|
|
212 |
log.info("daily send Notification");
|
|
|
213 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
214 |
propertiesDetails.put("dailySaleNotification", "0");
|
|
|
215 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
216 |
|
| 32048 |
tejbeer |
217 |
scheduledTasks.sendDailySalesNotificationToPartner(null);
|
| 29757 |
tejbeer |
218 |
|
| 32048 |
tejbeer |
219 |
propertiesDetails.put("dailySaleNotification", "1");
|
|
|
220 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
221 |
|
| 32048 |
tejbeer |
222 |
}
|
| 24841 |
govind |
223 |
|
| 32048 |
tejbeer |
224 |
/*
|
|
|
225 |
* @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
|
|
|
226 |
* Exception { reconciliation.dailyReconciliation(); }
|
|
|
227 |
*/
|
| 28205 |
tejbeer |
228 |
|
| 32048 |
tejbeer |
229 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
230 |
public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
|
|
|
231 |
log.info("selectFinServiceFollowUpDateByCurrDate");
|
|
|
232 |
scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
|
| 30049 |
amit.gupta |
233 |
|
| 32048 |
tejbeer |
234 |
}
|
| 30049 |
amit.gupta |
235 |
|
| 32165 |
amit.gupta |
236 |
@Scheduled(cron = "0 0 4 * * *")
|
| 32048 |
tejbeer |
237 |
public void processActivation() throws Exception {
|
| 29757 |
tejbeer |
238 |
|
| 32048 |
tejbeer |
239 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
240 |
propertiesDetails.put("processActivation", "0");
|
|
|
241 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
242 |
|
| 32048 |
tejbeer |
243 |
scheduledTasks.processActivation();
|
| 29757 |
tejbeer |
244 |
|
| 32048 |
tejbeer |
245 |
propertiesDetails.put("processActivation", "1");
|
|
|
246 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
247 |
|
| 32048 |
tejbeer |
248 |
}
|
| 25721 |
tejbeer |
249 |
|
| 32048 |
tejbeer |
250 |
// TODO: Change it back to first of every month
|
|
|
251 |
// @Scheduled(cron = "0 0 1 1 * *")
|
|
|
252 |
@Scheduled(cron = "0 0 1 2 * *")
|
|
|
253 |
public void rollOutUpgardedMargins() throws Exception {
|
| 35522 |
amit |
254 |
scheduledTasks.rollOutUpgardedMarginsNextMonth(null);
|
| 30788 |
amit.gupta |
255 |
|
| 32048 |
tejbeer |
256 |
}
|
| 30788 |
amit.gupta |
257 |
|
| 34241 |
tejus.loha |
258 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 32048 |
tejbeer |
259 |
public void sendNotification() throws Throwable {
|
| 29757 |
tejbeer |
260 |
|
| 32048 |
tejbeer |
261 |
log.info("send Notification");
|
|
|
262 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
263 |
propertiesDetails.put("sendNotification", "0");
|
|
|
264 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
265 |
|
| 32048 |
tejbeer |
266 |
scheduledTasks.sendNotification();
|
|
|
267 |
propertiesDetails.put("sendNotification", "1");
|
|
|
268 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
269 |
log.info("send Notification Done");
|
| 29673 |
manish |
270 |
|
| 32048 |
tejbeer |
271 |
}
|
| 28205 |
tejbeer |
272 |
|
| 34669 |
amit.gupta |
273 |
//@Scheduled(cron = "0 */15 * * * *")
|
| 32048 |
tejbeer |
274 |
public void checkRazorPayPaymentStatus() throws Throwable {
|
| 29757 |
tejbeer |
275 |
|
| 32048 |
tejbeer |
276 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
277 |
propertiesDetails.put("checkRazorPayPaymentStatus", "0");
|
|
|
278 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
279 |
|
| 32048 |
tejbeer |
280 |
scheduledTasks.checkRazorPayPaymentStatus();
|
|
|
281 |
propertiesDetails.put("checkRazorPayPaymentStatus", "1");
|
|
|
282 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
283 |
|
| 32048 |
tejbeer |
284 |
}
|
| 28377 |
tejbeer |
285 |
|
| 34241 |
tejus.loha |
286 |
@Scheduled(fixedDelay = 2 * 1000)
|
| 33426 |
amit.gupta |
287 |
//@Scheduled(cron = "0 5 23 * * *")
|
| 32048 |
tejbeer |
288 |
public void updateIrnsToInvoices() throws Throwable {
|
|
|
289 |
runOnceTasks.updateIrnsToInvoices();
|
|
|
290 |
}
|
| 31612 |
tejbeer |
291 |
|
| 32048 |
tejbeer |
292 |
// No longer needed
|
|
|
293 |
// @Scheduled(cron = "0 */10 * * * *")
|
|
|
294 |
public void attachToffeeInvoices() throws Throwable {
|
| 29757 |
tejbeer |
295 |
|
| 32048 |
tejbeer |
296 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
297 |
propertiesDetails.put("attachToffeeInvoices", "0");
|
|
|
298 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
299 |
|
| 32048 |
tejbeer |
300 |
scheduledTasks.attachToffeeInvoices();
|
| 29757 |
tejbeer |
301 |
|
| 32048 |
tejbeer |
302 |
propertiesDetails.put("attachToffeeInvoices", "1");
|
|
|
303 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
304 |
|
| 32048 |
tejbeer |
305 |
}
|
| 24841 |
govind |
306 |
|
| 35568 |
amit |
307 |
// REMOVED: ticketClosed() scheduler - now handled by TicketRelatedScheduledTask.autoCloseResolvedTickets()
|
|
|
308 |
// which uses 8 working days instead of 7 calendar days and runs as part of processAllTicketTasks()
|
| 26283 |
tejbeer |
309 |
|
| 32048 |
tejbeer |
310 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
311 |
public void checkfocusedModelInPartnerStock() throws Throwable {
|
|
|
312 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
313 |
|
| 32048 |
tejbeer |
314 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
315 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
|
|
|
316 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
317 |
|
| 32048 |
tejbeer |
318 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
|
|
319 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
|
|
|
320 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 25721 |
tejbeer |
321 |
|
| 32048 |
tejbeer |
322 |
log.info("endTime" + LocalDateTime.now());
|
|
|
323 |
}
|
| 28205 |
tejbeer |
324 |
|
| 32048 |
tejbeer |
325 |
@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
|
|
|
326 |
public void notifyLead() throws Throwable {
|
| 29757 |
tejbeer |
327 |
|
| 32048 |
tejbeer |
328 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
329 |
propertiesDetails.put("notifyLead", "0");
|
|
|
330 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
331 |
|
| 32048 |
tejbeer |
332 |
scheduledTasks.notifyLead();
|
| 29757 |
tejbeer |
333 |
|
| 32048 |
tejbeer |
334 |
propertiesDetails.put("notifyLead", "1");
|
|
|
335 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
336 |
|
| 32048 |
tejbeer |
337 |
// scheduledTasks.notifyVisits();
|
|
|
338 |
}
|
| 25721 |
tejbeer |
339 |
|
| 32048 |
tejbeer |
340 |
// No longer scheduled
|
|
|
341 |
// @Scheduled(cron = "0 0 1 * * *")
|
|
|
342 |
public void fetchImeiActivation() throws Throwable {
|
|
|
343 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
344 |
propertiesDetails.put("fetchImeiActivation", "0");
|
|
|
345 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
346 |
|
| 32048 |
tejbeer |
347 |
runOnceTasks.fetchImeiActivation(0);
|
| 29757 |
tejbeer |
348 |
|
| 32048 |
tejbeer |
349 |
propertiesDetails.put("fetchImeiActivation", "1");
|
|
|
350 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
351 |
|
| 32048 |
tejbeer |
352 |
}
|
| 26790 |
tejbeer |
353 |
|
| 32411 |
amit.gupta |
354 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
355 |
//Send all lead owners the report for scheduled followups missed
|
|
|
356 |
public void sendUnscheduledFollowUpMail() throws Exception {
|
|
|
357 |
scheduledTasks.sendUnscheduledFollowUpMail();
|
|
|
358 |
}
|
|
|
359 |
|
| 32048 |
tejbeer |
360 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
361 |
public void checkValidateReferral() throws Throwable {
|
|
|
362 |
log.info("startTime" + LocalDateTime.now());
|
|
|
363 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
364 |
propertiesDetails.put("checkValidateReferral", "0");
|
|
|
365 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
366 |
|
| 32048 |
tejbeer |
367 |
scheduledTasks.checkValidateReferral();
|
| 29757 |
tejbeer |
368 |
|
| 32048 |
tejbeer |
369 |
propertiesDetails.put("checkValidateReferral", "1");
|
|
|
370 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26790 |
tejbeer |
371 |
|
| 32048 |
tejbeer |
372 |
log.info("endTime" + LocalDateTime.now());
|
|
|
373 |
}
|
| 26790 |
tejbeer |
374 |
|
| 32048 |
tejbeer |
375 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
376 |
public void partnerProblemAlert() throws Throwable {
|
|
|
377 |
log.info("startTime" + LocalDateTime.now());
|
|
|
378 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
379 |
propertiesDetails.put("partnerProblemAlert", "0");
|
|
|
380 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
381 |
|
| 32048 |
tejbeer |
382 |
scheduledTasks.partnerProblemAlert();
|
|
|
383 |
propertiesDetails.put("partnerProblemAlert", "1");
|
|
|
384 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
385 |
|
| 32048 |
tejbeer |
386 |
log.info("endTime" + LocalDateTime.now());
|
|
|
387 |
}
|
| 28921 |
tejbeer |
388 |
|
| 32048 |
tejbeer |
389 |
/*
|
|
|
390 |
* @Scheduled(cron = "0 30 10 * * MON-SAT") public void
|
|
|
391 |
* sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
|
|
|
392 |
* LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
|
|
|
393 |
* LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
|
|
|
394 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
395 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
396 |
*
|
| 32048 |
tejbeer |
397 |
* scheduledTasks.sendAttendanceMorningAlert();
|
|
|
398 |
* propertiesDetails.put("sendMorningAttendanceAlert", "1");
|
|
|
399 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
400 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
401 |
*
|
| 32048 |
tejbeer |
402 |
* log.info("endTime" + LocalDateTime.now()); }
|
| 32507 |
amit.gupta |
403 |
*
|
| 32048 |
tejbeer |
404 |
* @Scheduled(cron = "0 30 20 * * MON-SAT") public void
|
|
|
405 |
* sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
|
|
|
406 |
* LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
|
|
|
407 |
* LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
|
|
|
408 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
409 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
410 |
*
|
| 32048 |
tejbeer |
411 |
* scheduledTasks.sendAttendanceEveningAlert();
|
|
|
412 |
* propertiesDetails.put("sendEveningAttendanceAlert", "1");
|
|
|
413 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
414 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
415 |
*
|
| 32048 |
tejbeer |
416 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
417 |
*/
|
| 29673 |
manish |
418 |
|
| 35109 |
ranu |
419 |
@Scheduled(cron = "0 0 10 * * *")
|
| 32048 |
tejbeer |
420 |
public void onboardingEventDelays() throws Throwable {
|
|
|
421 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
422 |
|
| 32048 |
tejbeer |
423 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
424 |
propertiesDetails.put("onboardingEventDelays", "0");
|
|
|
425 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
426 |
|
| 32048 |
tejbeer |
427 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
| 29757 |
tejbeer |
428 |
|
| 32048 |
tejbeer |
429 |
propertiesDetails.put("onboardingEventDelays", "1");
|
|
|
430 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
431 |
|
| 32048 |
tejbeer |
432 |
log.info("endTime" + LocalDateTime.now());
|
|
|
433 |
}
|
| 28921 |
tejbeer |
434 |
|
| 32048 |
tejbeer |
435 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
436 |
public void brandingAlert() throws Throwable {
|
|
|
437 |
log.info("startTime" + LocalDateTime.now());
|
|
|
438 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
439 |
propertiesDetails.put("brandingAlert", "0");
|
|
|
440 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
441 |
|
| 32048 |
tejbeer |
442 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
|
|
443 |
propertiesDetails.put("brandingAlert", "1");
|
|
|
444 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
445 |
|
| 32048 |
tejbeer |
446 |
log.info("endTime" + LocalDateTime.now());
|
|
|
447 |
}
|
| 28921 |
tejbeer |
448 |
|
| 33859 |
tejus.loha |
449 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
450 |
// public void advancePaymentPendingAlert() throws Throwable {
|
|
|
451 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
452 |
//
|
|
|
453 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
454 |
// propertiesDetails.put("advancePaymentPendingAlert", "0");
|
|
|
455 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
456 |
//
|
|
|
457 |
// onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
|
|
458 |
// propertiesDetails.put("advancePaymentPendingAlert", "1");
|
|
|
459 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
460 |
//
|
|
|
461 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
462 |
// }
|
| 29757 |
tejbeer |
463 |
|
| 32048 |
tejbeer |
464 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
465 |
public void fullPaymentPendingAlert() throws Throwable {
|
|
|
466 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
467 |
|
| 32048 |
tejbeer |
468 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
469 |
propertiesDetails.put("fullPaymentPendingAlert", "0");
|
|
|
470 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
471 |
|
| 32048 |
tejbeer |
472 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
| 29757 |
tejbeer |
473 |
|
| 32048 |
tejbeer |
474 |
propertiesDetails.put("fullPaymentPendingAlert", "1");
|
|
|
475 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
476 |
|
| 32048 |
tejbeer |
477 |
log.info("endTime" + LocalDateTime.now());
|
|
|
478 |
}
|
| 28921 |
tejbeer |
479 |
|
| 33859 |
tejus.loha |
480 |
// @Scheduled(cron = "0 0 9 * * *")
|
|
|
481 |
// public void advancePaymentPendinglegalAlert() throws Throwable {
|
|
|
482 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
483 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
484 |
// propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
|
|
|
485 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
486 |
//
|
|
|
487 |
//// onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
488 |
//
|
|
|
489 |
// propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
|
|
|
490 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
491 |
//
|
|
|
492 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
493 |
// }
|
| 29673 |
manish |
494 |
|
| 32048 |
tejbeer |
495 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
496 |
public void onBoardingCompleteEventEmail() throws Throwable {
|
|
|
497 |
log.info("startTime" + LocalDateTime.now());
|
|
|
498 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
499 |
propertiesDetails.put("onBoardingCompleteEventEmail", "0");
|
|
|
500 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
501 |
|
| 32048 |
tejbeer |
502 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
|
|
503 |
propertiesDetails.put("onBoardingCompleteEventEmail", "1");
|
|
|
504 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
505 |
|
| 32048 |
tejbeer |
506 |
log.info("endTime" + LocalDateTime.now());
|
|
|
507 |
}
|
| 29040 |
tejbeer |
508 |
|
| 32048 |
tejbeer |
509 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
510 |
public void updateSaholicCISTable() throws Throwable {
|
|
|
511 |
log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
|
|
|
512 |
runOnceTasks.updateSaholicCISTable();
|
|
|
513 |
log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
|
|
|
514 |
}
|
| 30667 |
amit.gupta |
515 |
|
| 34241 |
tejus.loha |
516 |
@Autowired
|
|
|
517 |
PurSaleService purSaleService;
|
|
|
518 |
|
| 35133 |
ranu |
519 |
@Scheduled(cron = "0 0 6,22 * * ?")
|
| 34241 |
tejus.loha |
520 |
public void send10DaysEgedStockReport() throws Throwable {
|
| 34275 |
tejus.loha |
521 |
log.info("moreThen10DaysEgedStockReport startTime" + LocalDateTime.now());
|
|
|
522 |
scheduledTasks.send10OrMoreOlderStockReport();
|
|
|
523 |
log.info("moreThen10DaysEgedStockReport endTime" + LocalDateTime.now());
|
| 34241 |
tejus.loha |
524 |
}
|
|
|
525 |
|
| 35616 |
amit |
526 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 32048 |
tejbeer |
527 |
public void fetchPartnerStat() throws Throwable {
|
|
|
528 |
scheduledTasks.fetchParnterStats();
|
|
|
529 |
}
|
| 30390 |
amit.gupta |
530 |
|
| 33859 |
tejus.loha |
531 |
// @Scheduled(cron = "0 0 9 * * *")
|
|
|
532 |
// public void storeTimelinePromoterPending() throws Throwable {
|
|
|
533 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
534 |
//
|
|
|
535 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
536 |
// propertiesDetails.put("storeTimelinePromoterPending", "0");
|
|
|
537 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
538 |
//
|
|
|
539 |
//// onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
540 |
// propertiesDetails.put("storeTimelinePromoterPending", "1");
|
|
|
541 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
542 |
//
|
|
|
543 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
544 |
// }
|
| 29757 |
tejbeer |
545 |
|
| 34669 |
amit.gupta |
546 |
//@Scheduled(cron = "0 0 23 * * *")
|
| 32214 |
jai.hind |
547 |
public void checkItelImeiActivationNew() throws Throwable {
|
|
|
548 |
log.info("startTime" + LocalDate.now());
|
|
|
549 |
|
|
|
550 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
551 |
propertiesDetails.put("checkItelImeiActivationNew", "0");
|
|
|
552 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
553 |
log.info("startTimecheckItelImeiActivation" + LocalDate.now());
|
|
|
554 |
scheduledTasks.checkItelImeiActivationNew(LocalDate.now(), 90);
|
|
|
555 |
long secs = (new Date().getTime()) / 1000;
|
|
|
556 |
log.info("endTimecheckItelImeiActivation" + LocalDate.now());
|
|
|
557 |
propertiesDetails.put("checkItelImeiActivationNew", "1");
|
|
|
558 |
propertiesDetails.put("itelDate", Long.toString(secs));
|
|
|
559 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
560 |
|
|
|
561 |
}
|
|
|
562 |
|
|
|
563 |
|
| 32048 |
tejbeer |
564 |
@Scheduled(fixedDelay = 60 * 1000)
|
|
|
565 |
public void vivoImeiActivation() throws Throwable {
|
|
|
566 |
log.info("startTimevivoImeiActivation" + LocalDateTime.now());
|
| 29757 |
tejbeer |
567 |
|
| 32048 |
tejbeer |
568 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
569 |
propertiesDetails.put("vivoImeiActivation", "0");
|
|
|
570 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
571 |
|
| 32048 |
tejbeer |
572 |
scheduledTasks.checkImeiActivation();
|
|
|
573 |
long secs = (new Date().getTime()) / 1000;
|
|
|
574 |
log.info("endTimevivoImeiActivation" + LocalDateTime.now());
|
|
|
575 |
propertiesDetails.put("vivoImeiActivation", "1");
|
| 29757 |
tejbeer |
576 |
|
| 32048 |
tejbeer |
577 |
propertiesDetails.put("vivoDate", Long.toString(secs));
|
|
|
578 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
579 |
|
| 32048 |
tejbeer |
580 |
}
|
| 29255 |
tejbeer |
581 |
|
| 32048 |
tejbeer |
582 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
583 |
public void reviewUncontactablePartner() throws Throwable {
|
|
|
584 |
log.info("startTime" + LocalDateTime.now());
|
| 30421 |
tejbeer |
585 |
|
| 32048 |
tejbeer |
586 |
scheduledTasks.reviewUncontactablePartner();
|
| 30421 |
tejbeer |
587 |
|
| 32048 |
tejbeer |
588 |
}
|
| 30421 |
tejbeer |
589 |
|
| 33928 |
ranu |
590 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
591 |
public void setMovementWiseRbmTodayTargets() throws Throwable {
|
| 34669 |
amit.gupta |
592 |
log.info("today targets startTime {}", LocalDateTime.now());
|
| 33928 |
ranu |
593 |
|
|
|
594 |
scheduledTasks.persistRbmTodayTargets();
|
|
|
595 |
|
|
|
596 |
}
|
|
|
597 |
|
| 33986 |
ranu |
598 |
@Scheduled(cron = "0 0 21 * * *")
|
|
|
599 |
public void setMovementWiseRbmTodayAchievements() throws Throwable {
|
| 34669 |
amit.gupta |
600 |
log.info("today achievement startTime {}", LocalDateTime.now());
|
| 33986 |
ranu |
601 |
|
|
|
602 |
scheduledTasks.persistRbmTodayAchievements();
|
|
|
603 |
|
|
|
604 |
}
|
|
|
605 |
|
| 33078 |
ranu |
606 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
607 |
public void reviewNonSdBuyingBrand() throws Throwable {
|
|
|
608 |
log.info("startTime" + LocalDateTime.now());
|
|
|
609 |
|
|
|
610 |
scheduledTasks.reviewNonSdBuyingBrand();
|
|
|
611 |
|
|
|
612 |
}
|
|
|
613 |
|
| 32048 |
tejbeer |
614 |
@Autowired
|
|
|
615 |
private StandAlone standAlone;
|
| 30352 |
amit.gupta |
616 |
|
| 32832 |
amit.gupta |
617 |
@Autowired
|
|
|
618 |
OrderTrackingService orderTrackingService;
|
|
|
619 |
|
| 32147 |
amit.gupta |
620 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 32048 |
tejbeer |
621 |
public void oppo() throws Throwable {
|
|
|
622 |
standAlone.checkOppoImeiStatus();
|
|
|
623 |
}
|
| 30352 |
amit.gupta |
624 |
|
| 34421 |
amit.gupta |
625 |
@Scheduled(fixedDelay = 60 * 1000)
|
|
|
626 |
public void realme() throws Throwable {
|
|
|
627 |
standAlone.checkRealmeImeiStatus();
|
|
|
628 |
}
|
|
|
629 |
|
| 32801 |
amit.gupta |
630 |
@Scheduled(cron = "0 0 * * * *")
|
| 32048 |
tejbeer |
631 |
public void markBlueDartOrderDelivered() throws Throwable {
|
|
|
632 |
log.info("startTime" + LocalDateTime.now());
|
| 32832 |
amit.gupta |
633 |
orderTrackingService.markBlueDartOrderDelivered();
|
| 32048 |
tejbeer |
634 |
log.info("endTime" + LocalDateTime.now());
|
|
|
635 |
}
|
| 31117 |
tejbeer |
636 |
|
| 32881 |
amit.gupta |
637 |
@Scheduled(cron = "0 15 * * * *")
|
| 32048 |
tejbeer |
638 |
public void markDelhiveryOrderDelivered() throws Throwable {
|
|
|
639 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
640 |
propertiesDetails.put("markDelhiveryOrderDelivered", "0");
|
|
|
641 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
642 |
|
| 32048 |
tejbeer |
643 |
log.info("startTime" + LocalDateTime.now());
|
| 32832 |
amit.gupta |
644 |
orderTrackingService.markDelhiveryOrderDelivered();
|
| 32048 |
tejbeer |
645 |
propertiesDetails.put("markDelhiveryOrderDelivered", "1");
|
|
|
646 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
647 |
|
| 32048 |
tejbeer |
648 |
log.info("endTime" + LocalDateTime.now());
|
|
|
649 |
}
|
| 29308 |
tejbeer |
650 |
|
| 32048 |
tejbeer |
651 |
@Scheduled(cron = "0 0 4 * * *")
|
|
|
652 |
public void processPriceDrop() throws Throwable {
|
|
|
653 |
scheduledTasks.processPriceDrop();
|
|
|
654 |
}
|
| 30637 |
amit.gupta |
655 |
|
| 32048 |
tejbeer |
656 |
@Scheduled(cron = "0 0 0 * * *")
|
|
|
657 |
public void calculateInterestAccured() throws Throwable {
|
| 34710 |
amit.gupta |
658 |
scheduledTasks.loanSettlement();
|
| 32048 |
tejbeer |
659 |
scheduledTasks.calculateInterestAccured();
|
|
|
660 |
}
|
| 30859 |
tejbeer |
661 |
|
| 32117 |
tejbeer |
662 |
// @Scheduled(cron = "0 */5 2-22 * * *")
|
| 33181 |
amit.gupta |
663 |
@Scheduled(fixedDelay = 1 * 60 * 1000)
|
| 32531 |
amit.gupta |
664 |
//@Scheduled(cron = "0 0 23 * * *")
|
| 32048 |
tejbeer |
665 |
public void loanSettlement() throws Throwable {
|
| 34756 |
amit.gupta |
666 |
LocalTime now = LocalTime.now();
|
| 34767 |
amit.gupta |
667 |
LocalTime start = LocalTime.of(9, 0);
|
| 34757 |
amit.gupta |
668 |
LocalTime end = LocalTime.of(23, 0);
|
| 34756 |
amit.gupta |
669 |
|
|
|
670 |
if (now.isBefore(start) || now.isAfter(end)) {
|
| 34762 |
amit.gupta |
671 |
System.out.println("Task skipped during restricted hours: " + now);
|
|
|
672 |
} else {
|
| 34756 |
amit.gupta |
673 |
scheduledTasks.loanSettlement();
|
|
|
674 |
System.out.println("Task executed at " + now);
|
|
|
675 |
}
|
| 32048 |
tejbeer |
676 |
}
|
| 30859 |
tejbeer |
677 |
|
| 32048 |
tejbeer |
678 |
@Scheduled(cron = "0 */15 * * * *")
|
|
|
679 |
public void ccAvenueSettlement() throws Throwable {
|
|
|
680 |
scheduledTasks.settleCCAvePayments();
|
|
|
681 |
}
|
| 31332 |
amit.gupta |
682 |
|
| 32048 |
tejbeer |
683 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
684 |
public void dailyLoanAlert() throws Throwable {
|
|
|
685 |
scheduledTasks.dailyLoanAlert();
|
|
|
686 |
}
|
| 30896 |
amit.gupta |
687 |
|
| 35106 |
ranu |
688 |
@Scheduled(cron = "0 0 11 * * *")
|
| 34162 |
ranu |
689 |
public void groupHidCatalogsByWeeks() throws Throwable {
|
|
|
690 |
scheduledTasks.groupHidCatalogsByWeeks();
|
|
|
691 |
}
|
|
|
692 |
|
| 34321 |
ranu |
693 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
694 |
public void sendFeebackSalesAndRbm() throws Throwable {
|
|
|
695 |
scheduledTasksTest.sendRbmFeedbackSummaryEmail();
|
|
|
696 |
scheduledTasksTest.sendSalesFeedbackSummaryEmail();
|
|
|
697 |
}
|
|
|
698 |
|
| 32165 |
amit.gupta |
699 |
//Look out for imeis that have activation pending based of sale and mark create new SIO out of them
|
| 32048 |
tejbeer |
700 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
701 |
public void processActivatedImeisForSchemes() throws Throwable {
|
|
|
702 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
703 |
}
|
| 34241 |
tejus.loha |
704 |
|
| 33357 |
amit.gupta |
705 |
//On every fifth update deductions
|
| 33435 |
amit.gupta |
706 |
@Scheduled(cron = "0 30 6 5 * ?")
|
| 33357 |
amit.gupta |
707 |
public void processSidbiDeductions() throws Throwable {
|
|
|
708 |
scheduledTasks.processSidbiDeductions();
|
|
|
709 |
}
|
| 34669 |
amit.gupta |
710 |
|
| 34374 |
amit.gupta |
711 |
//Dont reset it for now as proposed by TV
|
|
|
712 |
//@Scheduled(cron = "0 30 6 4 * ?")
|
| 33904 |
amit.gupta |
713 |
public void resetHardLimit() throws Throwable {
|
|
|
714 |
scheduledTasks.resetHardLimit();
|
|
|
715 |
}
|
|
|
716 |
|
| 34830 |
ranu |
717 |
@Scheduled(cron = "0 0/20 * * * *")
|
| 32048 |
tejbeer |
718 |
public void updatePartnerLimit() throws Throwable {
|
|
|
719 |
scheduledTasks.updatePartnerLimit();
|
|
|
720 |
}
|
| 30929 |
tejbeer |
721 |
|
| 34253 |
ranu |
722 |
@Scheduled(cron = "0 0 9,14,18 * * *")
|
| 33874 |
ranu |
723 |
public void createOpeningStockPartyWise() throws Throwable {
|
|
|
724 |
scheduledTasks.createOpeningStockPartyWise();
|
|
|
725 |
}
|
| 30936 |
tejbeer |
726 |
|
| 33874 |
ranu |
727 |
|
| 32842 |
amit.gupta |
728 |
//Loans due/overdue/default notifications sent to parnters
|
|
|
729 |
@Scheduled(cron = "0 0 11 * * *")
|
| 32822 |
ranu |
730 |
public void sendMailWhatsAppAfterLoanDueDate() throws Throwable {
|
|
|
731 |
scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
|
|
|
732 |
}
|
| 34241 |
tejus.loha |
733 |
|
| 32842 |
amit.gupta |
734 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
735 |
public void alertForDueDate() throws Throwable {
|
|
|
736 |
scheduledTasks.alertForDueDate();
|
|
|
737 |
}
|
| 32822 |
ranu |
738 |
|
| 35133 |
ranu |
739 |
@Scheduled(cron = "0 0 4,21 * * *")
|
| 32048 |
tejbeer |
740 |
public void notifyLoanDueDateCross() throws Throwable {
|
|
|
741 |
scheduledTasks.notifyLoanDueDateCross();
|
|
|
742 |
}
|
| 30936 |
tejbeer |
743 |
|
| 35133 |
ranu |
744 |
@Scheduled(cron = "0 0 4,21 * * *")
|
| 32048 |
tejbeer |
745 |
public void notifyDefaultLoans() throws Throwable {
|
|
|
746 |
scheduledTasks.notifyDefaultLoans();
|
|
|
747 |
}
|
| 30936 |
tejbeer |
748 |
|
| 34910 |
ranu |
749 |
// @Scheduled(cron = "0 0 23 * * *")
|
| 32048 |
tejbeer |
750 |
public void hygineAlertForInternalTeam() throws Throwable {
|
|
|
751 |
scheduledTasks.hygineAlertForInternalTeam();
|
| 31206 |
tejbeer |
752 |
|
| 32048 |
tejbeer |
753 |
}
|
| 31206 |
tejbeer |
754 |
|
| 32048 |
tejbeer |
755 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
756 |
public void hygineAlertForPartner() throws Throwable {
|
|
|
757 |
scheduledTasks.hygineAlertForPartner();
|
| 31206 |
tejbeer |
758 |
|
| 32048 |
tejbeer |
759 |
}
|
| 31206 |
tejbeer |
760 |
|
| 32048 |
tejbeer |
761 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
762 |
public void monthlyTargetForPartner() throws Throwable {
|
|
|
763 |
scheduledTasks.monthlyTargetForPartner();
|
| 31249 |
tejbeer |
764 |
|
| 32048 |
tejbeer |
765 |
}
|
| 31249 |
tejbeer |
766 |
|
| 32048 |
tejbeer |
767 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
768 |
public void monthlyTargetForInternalTeam() throws Throwable {
|
|
|
769 |
scheduledTasks.monthlyTargetForInternalTeam();
|
| 31249 |
tejbeer |
770 |
|
| 32048 |
tejbeer |
771 |
}
|
| 31612 |
tejbeer |
772 |
|
| 32048 |
tejbeer |
773 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
774 |
public void sendSamsungRebilling() throws Throwable {
|
|
|
775 |
scheduledTasks.sendMailForSamsungRebilling();
|
|
|
776 |
}
|
| 31931 |
amit.gupta |
777 |
|
| 32048 |
tejbeer |
778 |
@Scheduled(cron = "0 10 8 * * *")
|
|
|
779 |
public void sendMailForAgeingAlert() throws Throwable {
|
|
|
780 |
scheduledTasks.sendMailForAgeingAlert();
|
|
|
781 |
}
|
|
|
782 |
|
|
|
783 |
|
|
|
784 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
785 |
public void sendFilteredRetailerPerformance() throws Throwable {
|
|
|
786 |
scheduledTasks.sendFilteredRetailerPerformance();
|
|
|
787 |
}
|
| 32690 |
amit.gupta |
788 |
|
| 33444 |
ranu |
789 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
790 |
public void findAllLiveDemoBrandItemsByBillingDate() throws Throwable {
|
|
|
791 |
scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
|
|
|
792 |
}
|
| 34241 |
tejus.loha |
793 |
|
| 33464 |
ranu |
794 |
@Scheduled(cron = "0 10 6 * * *")
|
|
|
795 |
public void findTodayPocoBillingItems() throws Throwable {
|
|
|
796 |
scheduledTasks.findTodayPocoBillingItems();
|
|
|
797 |
}
|
| 32690 |
amit.gupta |
798 |
|
| 33444 |
ranu |
799 |
|
| 32690 |
amit.gupta |
800 |
@Scheduled(cron = "0 0 12 * * *")
|
|
|
801 |
public void rejectPriceDropsOfApprovedImeis() throws Throwable {
|
|
|
802 |
scheduledTasks.rejectPriceDropsOfApprovedImeis();
|
|
|
803 |
}
|
| 32907 |
amit.gupta |
804 |
|
|
|
805 |
@Autowired
|
|
|
806 |
POScheduler poScheduler;
|
| 34241 |
tejus.loha |
807 |
|
| 32907 |
amit.gupta |
808 |
@Scheduled(cron = "0 0 1 * * *")
|
| 33643 |
amit.gupta |
809 |
public void autoClosePO() {
|
| 32907 |
amit.gupta |
810 |
poScheduler.autoClosePurchaseOrders();
|
|
|
811 |
}
|
| 32048 |
tejbeer |
812 |
/*
|
|
|
813 |
* @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
|
|
|
814 |
* throws Throwable { log.info("startTime" + LocalDateTime.now());
|
|
|
815 |
* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
816 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
817 |
*/
|
| 34443 |
vikas.jang |
818 |
|
| 34547 |
vikas.jang |
819 |
@Scheduled(cron = "0 50 23 * * *")
|
| 34443 |
vikas.jang |
820 |
public void bidConfirmation() throws Throwable {
|
| 34547 |
vikas.jang |
821 |
log.info("running bid cron at 23:50PM");
|
| 34443 |
vikas.jang |
822 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.YESTERDAY);
|
|
|
823 |
}
|
|
|
824 |
|
| 34547 |
vikas.jang |
825 |
@Scheduled(cron = "0 0 19 * * *")
|
| 34443 |
vikas.jang |
826 |
public void processLiquidationBids() throws Throwable {
|
| 34547 |
vikas.jang |
827 |
log.info("running bid cron at 07:00PM");
|
| 34443 |
vikas.jang |
828 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
829 |
}
|
|
|
830 |
|
| 34547 |
vikas.jang |
831 |
@Scheduled(cron = "0 30 21 * * *")
|
| 34443 |
vikas.jang |
832 |
public void bidPurchaseOrder() throws Throwable {
|
| 34547 |
vikas.jang |
833 |
log.info("running bid cron at 09:30PM");
|
| 34443 |
vikas.jang |
834 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
835 |
}
|
| 34547 |
vikas.jang |
836 |
|
| 34669 |
amit.gupta |
837 |
/*@Scheduled(cron = "0 0 12 * * *")
|
|
|
838 |
public void processCashDiscount() throws Throwable {
|
|
|
839 |
scheduledTasks.processCashDiscount();
|
|
|
840 |
}*/
|
|
|
841 |
|
|
|
842 |
|
| 34563 |
vikas.jang |
843 |
@Scheduled(cron = "0 0 9,17 * * *")
|
| 34547 |
vikas.jang |
844 |
public void bidConsolidatedMessage() throws Throwable {
|
|
|
845 |
log.info("Running bid cron at 09:00 AM or 05:00 PM");
|
|
|
846 |
runOnceTasks.consolidatedBiddingMessage();
|
| 34563 |
vikas.jang |
847 |
}
|
| 34770 |
vikas.jang |
848 |
|
|
|
849 |
@Scheduled(cron = "0 0 8 * * *")
|
| 34836 |
vikas |
850 |
public void yesterdayTrackingReport() throws Throwable {
|
|
|
851 |
log.info("Running yesterday employee tracking cron at 08:00 AM");
|
|
|
852 |
runOnceTasks.yesterdayTrackingReport();
|
| 34770 |
vikas.jang |
853 |
}
|
| 34836 |
vikas |
854 |
|
| 35178 |
amit |
855 |
@Scheduled(cron = "0 10 8 * * *")
|
| 35177 |
amit |
856 |
public void partnerCreditExposureReport() throws Throwable {
|
|
|
857 |
log.info("Running yesterday employee tracking cron at 08:00 AM");
|
|
|
858 |
runOnceTasks.sendCreditExposureReport();
|
|
|
859 |
}
|
|
|
860 |
|
| 34836 |
vikas |
861 |
@Scheduled(cron = "0 0 21,16 * * *")
|
|
|
862 |
public void dailyTrackingReport() throws Throwable {
|
|
|
863 |
log.info("Running daily employee tracking cron at 09:00 PM and 04:00 PM");
|
|
|
864 |
runOnceTasks.dailyTrackingReport();
|
|
|
865 |
}
|
| 35105 |
vikas |
866 |
|
| 34792 |
amit.gupta |
867 |
@Scheduled(cron = "0 0 0 1 1,4,7,10 *")
|
|
|
868 |
public void sendUpdateMobileBrandMarketShareQuaterlyMail() throws Throwable {
|
| 34791 |
aman.kumar |
869 |
log.info("Running Marketshare update remined quaterly");
|
|
|
870 |
scheduledTasks.sendUpdateMobileBrandMarketShareQuaterlyMail();
|
|
|
871 |
}
|
| 35105 |
vikas |
872 |
|
|
|
873 |
@Scheduled(cron = "0 0 * * * *")
|
|
|
874 |
public void checkRewardsEligibility() throws Throwable {
|
|
|
875 |
log.info("Running Rewards Disburse daily");
|
|
|
876 |
runOnceTasks.checkRewardsEligibility();
|
|
|
877 |
}
|
| 35326 |
amit |
878 |
|
|
|
879 |
@Scheduled(cron="0 0 20 * * *")
|
|
|
880 |
public void sendTrialExpiry() {
|
|
|
881 |
scheduledTasks.sendTrialExpiry();
|
|
|
882 |
}
|
| 35666 |
vikas |
883 |
|
|
|
884 |
@Scheduled(cron = "0 0 0 * * *")
|
|
|
885 |
public void fetchOffersByItem() {
|
|
|
886 |
scheduledTasks.cachePinelabsOffers();
|
|
|
887 |
}
|
| 23756 |
amit.gupta |
888 |
}
|