Rev 29492 | Rev 29673 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.smartdukaan.cron.scheduled;import java.time.LocalDate;import java.time.LocalDateTime;import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.scheduling.annotation.Scheduled;import org.springframework.stereotype.Component;import com.smartdukaan.cron.migrations.RunOnceTasks;import com.smartdukaan.cron.monitored.NagiosMonitorTasks;import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;@Componentpublic class ScheduledSkeleton {private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);@Autowiredprivate ScheduledTasks scheduledTasks;@Autowiredprivate LeadSyncRunner leadSyncRunner;@Autowiredprivate Reconciliation reconciliation;@Autowiredprivate RunOnceTasks runOnceTasks;@AutowiredNagiosMonitorTasks nagiosMonitorTasks;@Autowiredprivate TicketRelatedScheduledTask ticketRelatedScheduledTask;@Autowiredprivate OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;// @Scheduled(cron = "0 0 2 * * *")public void processDailySchemes() throws Exception {scheduledTasks.processScheme(LocalDateTime.now().minusDays(7), LocalDateTime.now(), false);}@Scheduled(cron = "0 15 0 * * *")public void runOnceTasks() throws Exception {scheduledTasks.reconcileRecharge();}/** @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()* throws Exception { runOnceTasks.mailDashboardScreenshots(); }*/@Scheduled(cron = "0 05 0 1,16 * ?")public void processRechargeCashback() throws Throwable {scheduledTasks.processRechargeCashback();}@Scheduled(cron = "0 0 6 * * *")public void sendPartnerInvestmentDetails() throws Exception {scheduledTasks.sendPartnerInvestmentDetails();}@Scheduled(cron = "0 0 10,15,17 * * *")public void sendIndentTertiaryReport() throws Exception {scheduledTasks.sendIndentTertiary();}@Scheduled(cron = "0 0 6 * * *")public void checkPartnerActiveStoreByStatus() throws Exception {scheduledTasks.checkPartnerActiveStore();}// @Scheduled(cron = "0 0 8 * * *")public void sendStockAgeingReport() throws Throwable {scheduledTasks.sendAgeingReport();}@Scheduled(cron = "0 0/30 1-23 * * *")public void escalateTicket() throws ProfitMandiBusinessException {log.info("escalate ticket");ticketRelatedScheduledTask.escalateTicket();}@Scheduled(cron = "0 0 11 * * *")public void alertTicketToUser() throws Exception {log.info("alert for ticket");ticketRelatedScheduledTask.alertforTicket();}@Scheduled(cron = "0 0 12,18,23 ? * *")public void dailySaleNotification() throws Exception {log.info("daily send Notification");scheduledTasks.sendDailySalesNotificationToPartner(null);}/** @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws* Exception { reconciliation.dailyReconciliation(); }*/@Scheduled(cron = "0 0 1 * * *")public void processActivation() throws Exception {scheduledTasks.processActivation();}@Scheduled(cron = "0 */5 * * * *")public void sendNotification() throws Throwable {scheduledTasks.sendNotification();}@Scheduled(cron = "0 */15 * * * *")public void checkRazorPayPaymentStatus() throws Throwable {scheduledTasks.checkRazorPayPaymentStatus();}@Scheduled(cron = "0 */10 * * * *")public void attachToffeeInvoices() throws Throwable {scheduledTasks.attachToffeeInvoices();}@Scheduled(cron = "0 0 5 * * *")public void ticketClosed() throws Throwable {scheduledTasks.ticketClosed();}@Scheduled(cron = "0 0 10 * * *")public void checkfocusedModelInPartnerStock() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.checkfocusedModelInPartnerStock();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")public void notifyLead() throws Throwable {scheduledTasks.notifyLead();// scheduledTasks.notifyVisits();}@Scheduled(cron = "0 0 1 * * *")public void fetchImeiActivation() throws Throwable {runOnceTasks.fetchImeiActivation(0);}@Scheduled(cron = "0 0 1 * * *")public void checkValidateReferral() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.checkValidateReferral();log.info("endTime" + LocalDateTime.now());}// @Scheduled(cron = "0 0 8 * * *")public void partnerProblemAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.partnerProblemAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 30 10 * * MON-SAT")public void sendMorningAttendanceAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.sendAttendanceMorningAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 30 20 * * MON-SAT")public void sendEveningAttendanceAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.sendAttendanceEveningAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 7 * * *")public void onboardingEventDelays() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.onboardingEventDelays();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 8 * * *")public void brandingAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.brandingAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 8 * * *")public void advancePaymentPendingAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 8 * * *")public void fullPaymentPendingAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 9 * * *")public void advancePaymentPendinglegalAlert() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 */5 * * * *")public void onBoardingCompleteEventEmail() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 9 * * *")public void storeTimelinePromoterPending() throws Throwable {log.info("startTime" + LocalDateTime.now());onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 23 * * *")public void checkItelImeiActivation() throws Throwable {log.info("startTime" + LocalDate.now());scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);}@Scheduled(cron = "0 0 23 * * *")public void checkTecnoImeiActivation() throws Throwable {log.info("startTime" + LocalDate.now());scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);}@Scheduled(cron = "0 0 23 * * *")public void vivoImeiActivation() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.checkImeiActivation();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 * * * *")public void markDelhiveryOrderDelivered() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.markDelhiveryOrderDelivered();log.info("endTime" + LocalDateTime.now());}/** @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()* throws Throwable { log.info("startTime" + LocalDateTime.now());* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();* log.info("endTime" + LocalDateTime.now()); }*/}