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