Subversion Repositories SmartDukaan

Rev

Rev 29308 | Rev 29457 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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