| 23756 |
amit.gupta |
1 |
package com.smartdukaan.cron.scheduled;
|
|
|
2 |
|
| 29492 |
manish |
3 |
import java.time.LocalDate;
|
| 24420 |
amit.gupta |
4 |
import java.time.LocalDateTime;
|
| 24121 |
govind |
5 |
|
| 23756 |
amit.gupta |
6 |
import org.apache.logging.log4j.LogManager;
|
|
|
7 |
import org.apache.logging.log4j.Logger;
|
|
|
8 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
9 |
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
10 |
import org.springframework.stereotype.Component;
|
|
|
11 |
|
| 25782 |
amit.gupta |
12 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
| 23756 |
amit.gupta |
13 |
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
|
| 27007 |
amit.gupta |
14 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 24121 |
govind |
15 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 23756 |
amit.gupta |
16 |
|
|
|
17 |
@Component
|
|
|
18 |
public class ScheduledSkeleton {
|
| 23794 |
govind |
19 |
|
| 23756 |
amit.gupta |
20 |
private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
|
|
|
21 |
|
|
|
22 |
@Autowired
|
| 24784 |
amit.gupta |
23 |
private ScheduledTasks scheduledTasks;
|
| 28205 |
tejbeer |
24 |
|
| 27007 |
amit.gupta |
25 |
@Autowired
|
|
|
26 |
private LeadSyncRunner leadSyncRunner;
|
| 24841 |
govind |
27 |
|
| 24784 |
amit.gupta |
28 |
@Autowired
|
|
|
29 |
private Reconciliation reconciliation;
|
| 25822 |
amit.gupta |
30 |
|
| 25782 |
amit.gupta |
31 |
@Autowired
|
|
|
32 |
private RunOnceTasks runOnceTasks;
|
| 23756 |
amit.gupta |
33 |
|
|
|
34 |
@Autowired
|
|
|
35 |
NagiosMonitorTasks nagiosMonitorTasks;
|
| 24188 |
govind |
36 |
|
| 24135 |
govind |
37 |
@Autowired
|
| 24841 |
govind |
38 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
|
|
39 |
|
| 28921 |
tejbeer |
40 |
@Autowired
|
|
|
41 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
|
|
42 |
|
| 29255 |
tejbeer |
43 |
// @Scheduled(cron = "0 0 2 * * *")
|
| 24420 |
amit.gupta |
44 |
public void processDailySchemes() throws Exception {
|
| 28183 |
amit.gupta |
45 |
scheduledTasks.processScheme(LocalDateTime.now().minusDays(7), LocalDateTime.now(), false);
|
| 24420 |
amit.gupta |
46 |
}
|
| 24841 |
govind |
47 |
|
| 23761 |
amit.gupta |
48 |
@Scheduled(cron = "0 15 0 * * *")
|
| 25782 |
amit.gupta |
49 |
public void runOnceTasks() throws Exception {
|
| 23756 |
amit.gupta |
50 |
scheduledTasks.reconcileRecharge();
|
|
|
51 |
}
|
| 25822 |
amit.gupta |
52 |
|
| 28205 |
tejbeer |
53 |
/*
|
|
|
54 |
* @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
|
|
|
55 |
* throws Exception { runOnceTasks.mailDashboardScreenshots(); }
|
|
|
56 |
*/
|
| 25721 |
tejbeer |
57 |
|
| 23759 |
amit.gupta |
58 |
@Scheduled(cron = "0 05 0 1,16 * ?")
|
| 23756 |
amit.gupta |
59 |
public void processRechargeCashback() throws Throwable {
|
|
|
60 |
scheduledTasks.processRechargeCashback();
|
|
|
61 |
}
|
| 23794 |
govind |
62 |
|
| 27267 |
amit.gupta |
63 |
@Scheduled(cron = "0 0 6 * * *")
|
| 25563 |
amit.gupta |
64 |
public void sendPartnerInvestmentDetails() throws Exception {
|
| 23929 |
amit.gupta |
65 |
scheduledTasks.sendPartnerInvestmentDetails();
|
| 25893 |
amit.gupta |
66 |
}
|
| 28921 |
tejbeer |
67 |
|
| 28632 |
amit.gupta |
68 |
@Scheduled(cron = "0 0 10,15,17 * * *")
|
|
|
69 |
public void sendIndentTertiaryReport() throws Exception {
|
|
|
70 |
scheduledTasks.sendIndentTertiary();
|
|
|
71 |
}
|
| 28921 |
tejbeer |
72 |
|
| 28709 |
amit.gupta |
73 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
74 |
public void checkPartnerActiveStoreByStatus() throws Exception {
|
|
|
75 |
scheduledTasks.checkPartnerActiveStore();
|
|
|
76 |
}
|
| 26790 |
tejbeer |
77 |
|
| 28921 |
tejbeer |
78 |
// @Scheduled(cron = "0 0 8 * * *")
|
| 24681 |
amit.gupta |
79 |
public void sendStockAgeingReport() throws Throwable {
|
|
|
80 |
scheduledTasks.sendAgeingReport();
|
|
|
81 |
}
|
| 24131 |
govind |
82 |
|
| 24890 |
amit.gupta |
83 |
@Scheduled(cron = "0 0/30 1-23 * * *")
|
| 24841 |
govind |
84 |
public void escalateTicket() throws ProfitMandiBusinessException {
|
| 24653 |
govind |
85 |
log.info("escalate ticket");
|
| 24841 |
govind |
86 |
ticketRelatedScheduledTask.escalateTicket();
|
| 24533 |
govind |
87 |
}
|
| 24841 |
govind |
88 |
|
|
|
89 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
90 |
public void alertTicketToUser() throws Exception {
|
| 24653 |
govind |
91 |
log.info("alert for ticket");
|
| 24841 |
govind |
92 |
ticketRelatedScheduledTask.alertforTicket();
|
| 24653 |
govind |
93 |
}
|
| 24841 |
govind |
94 |
|
| 26943 |
amit.gupta |
95 |
@Scheduled(cron = "0 0 12,18,23 ? * *")
|
| 25822 |
amit.gupta |
96 |
public void dailySaleNotification() throws Exception {
|
|
|
97 |
log.info("daily send Notification");
|
| 25837 |
amit.gupta |
98 |
scheduledTasks.sendDailySalesNotificationToPartner(null);
|
| 25822 |
amit.gupta |
99 |
}
|
| 24841 |
govind |
100 |
|
| 29232 |
amit.gupta |
101 |
/*
|
|
|
102 |
* @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
|
|
|
103 |
* Exception { reconciliation.dailyReconciliation(); }
|
|
|
104 |
*/
|
| 28205 |
tejbeer |
105 |
|
| 27441 |
amit.gupta |
106 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
107 |
public void processActivation() throws Exception {
|
|
|
108 |
scheduledTasks.processActivation();
|
|
|
109 |
}
|
| 25721 |
tejbeer |
110 |
|
| 26944 |
amit.gupta |
111 |
@Scheduled(cron = "0 */5 * * * *")
|
| 25300 |
tejbeer |
112 |
public void sendNotification() throws Throwable {
|
|
|
113 |
scheduledTasks.sendNotification();
|
|
|
114 |
}
|
| 28205 |
tejbeer |
115 |
|
| 28377 |
tejbeer |
116 |
@Scheduled(cron = "0 */15 * * * *")
|
|
|
117 |
public void checkRazorPayPaymentStatus() throws Throwable {
|
|
|
118 |
scheduledTasks.checkRazorPayPaymentStatus();
|
|
|
119 |
}
|
|
|
120 |
|
| 27686 |
amit.gupta |
121 |
@Scheduled(cron = "0 */10 * * * *")
|
|
|
122 |
public void attachToffeeInvoices() throws Throwable {
|
|
|
123 |
scheduledTasks.attachToffeeInvoices();
|
|
|
124 |
}
|
| 24841 |
govind |
125 |
|
| 26283 |
tejbeer |
126 |
@Scheduled(cron = "0 0 5 * * *")
|
|
|
127 |
public void ticketClosed() throws Throwable {
|
|
|
128 |
|
|
|
129 |
scheduledTasks.ticketClosed();
|
|
|
130 |
|
|
|
131 |
}
|
|
|
132 |
|
| 29668 |
tejbeer |
133 |
@Scheduled(cron = "0 0 10 * * *")
|
| 25721 |
tejbeer |
134 |
public void checkfocusedModelInPartnerStock() throws Throwable {
|
|
|
135 |
log.info("startTime" + LocalDateTime.now());
|
|
|
136 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
|
|
137 |
|
|
|
138 |
log.info("endTime" + LocalDateTime.now());
|
|
|
139 |
}
|
| 28205 |
tejbeer |
140 |
|
| 26083 |
amit.gupta |
141 |
@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
|
| 25909 |
amit.gupta |
142 |
public void notifyLead() throws Throwable {
|
|
|
143 |
scheduledTasks.notifyLead();
|
| 28205 |
tejbeer |
144 |
// scheduledTasks.notifyVisits();
|
| 25909 |
amit.gupta |
145 |
}
|
| 25721 |
tejbeer |
146 |
|
| 26214 |
amit.gupta |
147 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
148 |
public void fetchImeiActivation() throws Throwable {
|
| 26408 |
amit.gupta |
149 |
runOnceTasks.fetchImeiActivation(0);
|
| 26214 |
amit.gupta |
150 |
}
|
| 26790 |
tejbeer |
151 |
|
|
|
152 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
153 |
public void checkValidateReferral() throws Throwable {
|
|
|
154 |
log.info("startTime" + LocalDateTime.now());
|
|
|
155 |
scheduledTasks.checkValidateReferral();
|
|
|
156 |
|
|
|
157 |
log.info("endTime" + LocalDateTime.now());
|
|
|
158 |
}
|
|
|
159 |
|
| 28921 |
tejbeer |
160 |
// @Scheduled(cron = "0 0 8 * * *")
|
| 28205 |
tejbeer |
161 |
public void partnerProblemAlert() throws Throwable {
|
|
|
162 |
log.info("startTime" + LocalDateTime.now());
|
|
|
163 |
scheduledTasks.partnerProblemAlert();
|
|
|
164 |
log.info("endTime" + LocalDateTime.now());
|
|
|
165 |
}
|
| 28921 |
tejbeer |
166 |
|
| 28788 |
amit.gupta |
167 |
@Scheduled(cron = "0 30 10 * * MON-SAT")
|
| 28783 |
amit.gupta |
168 |
public void sendMorningAttendanceAlert() throws Throwable {
|
|
|
169 |
log.info("startTime" + LocalDateTime.now());
|
|
|
170 |
scheduledTasks.sendAttendanceMorningAlert();
|
|
|
171 |
log.info("endTime" + LocalDateTime.now());
|
|
|
172 |
}
|
| 28921 |
tejbeer |
173 |
|
| 28788 |
amit.gupta |
174 |
@Scheduled(cron = "0 30 20 * * MON-SAT")
|
| 28783 |
amit.gupta |
175 |
public void sendEveningAttendanceAlert() throws Throwable {
|
|
|
176 |
log.info("startTime" + LocalDateTime.now());
|
|
|
177 |
scheduledTasks.sendAttendanceEveningAlert();
|
|
|
178 |
log.info("endTime" + LocalDateTime.now());
|
|
|
179 |
}
|
| 28921 |
tejbeer |
180 |
|
|
|
181 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
182 |
public void onboardingEventDelays() throws Throwable {
|
|
|
183 |
log.info("startTime" + LocalDateTime.now());
|
|
|
184 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
|
|
185 |
log.info("endTime" + LocalDateTime.now());
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
189 |
public void brandingAlert() throws Throwable {
|
|
|
190 |
log.info("startTime" + LocalDateTime.now());
|
|
|
191 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
|
|
192 |
log.info("endTime" + LocalDateTime.now());
|
|
|
193 |
}
|
|
|
194 |
|
|
|
195 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
196 |
public void advancePaymentPendingAlert() throws Throwable {
|
|
|
197 |
log.info("startTime" + LocalDateTime.now());
|
|
|
198 |
onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
|
|
199 |
log.info("endTime" + LocalDateTime.now());
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
203 |
public void fullPaymentPendingAlert() throws Throwable {
|
|
|
204 |
log.info("startTime" + LocalDateTime.now());
|
|
|
205 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
|
|
206 |
log.info("endTime" + LocalDateTime.now());
|
|
|
207 |
}
|
|
|
208 |
|
| 28963 |
tejbeer |
209 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
210 |
public void advancePaymentPendinglegalAlert() throws Throwable {
|
|
|
211 |
log.info("startTime" + LocalDateTime.now());
|
|
|
212 |
onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
213 |
log.info("endTime" + LocalDateTime.now());
|
|
|
214 |
}
|
|
|
215 |
|
| 29035 |
tejbeer |
216 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
217 |
public void onBoardingCompleteEventEmail() throws Throwable {
|
|
|
218 |
log.info("startTime" + LocalDateTime.now());
|
|
|
219 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
|
|
220 |
log.info("endTime" + LocalDateTime.now());
|
|
|
221 |
}
|
| 29040 |
tejbeer |
222 |
|
| 29255 |
tejbeer |
223 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
224 |
public void storeTimelinePromoterPending() throws Throwable {
|
|
|
225 |
log.info("startTime" + LocalDateTime.now());
|
|
|
226 |
onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
227 |
log.info("endTime" + LocalDateTime.now());
|
|
|
228 |
}
|
| 29668 |
tejbeer |
229 |
|
| 29467 |
amit.gupta |
230 |
@Scheduled(cron = "0 0 23 * * *")
|
| 29492 |
manish |
231 |
public void checkItelImeiActivation() throws Throwable {
|
|
|
232 |
log.info("startTime" + LocalDate.now());
|
| 29668 |
tejbeer |
233 |
scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
|
| 29492 |
manish |
234 |
}
|
| 29668 |
tejbeer |
235 |
|
| 29492 |
manish |
236 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
237 |
public void checkTecnoImeiActivation() throws Throwable {
|
|
|
238 |
log.info("startTime" + LocalDate.now());
|
| 29668 |
tejbeer |
239 |
scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
|
| 29492 |
manish |
240 |
}
|
| 29668 |
tejbeer |
241 |
|
| 29492 |
manish |
242 |
@Scheduled(cron = "0 0 23 * * *")
|
| 29457 |
manish |
243 |
public void vivoImeiActivation() throws Throwable {
|
|
|
244 |
log.info("startTime" + LocalDateTime.now());
|
|
|
245 |
scheduledTasks.checkImeiActivation();
|
|
|
246 |
log.info("endTime" + LocalDateTime.now());
|
|
|
247 |
}
|
| 29255 |
tejbeer |
248 |
|
| 29316 |
tejbeer |
249 |
@Scheduled(cron = "0 0 * * * *")
|
| 29308 |
tejbeer |
250 |
public void markDelhiveryOrderDelivered() throws Throwable {
|
|
|
251 |
log.info("startTime" + LocalDateTime.now());
|
|
|
252 |
scheduledTasks.markDelhiveryOrderDelivered();
|
|
|
253 |
log.info("endTime" + LocalDateTime.now());
|
|
|
254 |
}
|
|
|
255 |
|
| 29208 |
tejbeer |
256 |
/*
|
|
|
257 |
* @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
|
|
|
258 |
* throws Throwable { log.info("startTime" + LocalDateTime.now());
|
|
|
259 |
* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
260 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
261 |
*/
|
| 23756 |
amit.gupta |
262 |
}
|