Rev 25783 | Rev 25828 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.smartdukaan.cron.scheduled;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.spice.profitmandi.common.exception.ProfitMandiBusinessException;@Componentpublic class ScheduledSkeleton {private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);@Autowiredprivate ScheduledTasks scheduledTasks;@Autowiredprivate Reconciliation reconciliation;@Autowiredprivate RunOnceTasks runOnceTasks;@AutowiredNagiosMonitorTasks nagiosMonitorTasks;@Autowiredprivate TicketRelatedScheduledTask ticketRelatedScheduledTask;@Scheduled(cron = "0 0 2 * * *")public void processDailySchemes() throws Exception {scheduledTasks.processScheme(LocalDateTime.now().minusDays(21), LocalDateTime.now(), true);}@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 1 * * *")public void sendPartnerInvestmentDetails() throws Exception {scheduledTasks.sendPartnerInvestmentDetails();// scheduledTasks.sendTargetVsSalesReport(null);}@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 15,17,19,23 ? * *")public void dailySaleNotification() throws Exception {log.info("daily send Notification");scheduledTasks.sendDailySalesReportNotificationToPartner(null);}@Scheduled(cron = "0 0 6 * * *")public void dailyReconciliation() throws Exception {reconciliation.dailyReconciliation();}@Scheduled(cron = "0 */15 * * * *")public void sendNotification() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.sendNotification();log.info("endTime" + LocalDateTime.now());}@Scheduled(cron = "0 0 11 * * *")public void checkfocusedModelInPartnerStock() throws Throwable {log.info("startTime" + LocalDateTime.now());scheduledTasks.checkfocusedModelInPartnerStock();log.info("endTime" + LocalDateTime.now());}}