Rev 23768 | Rev 23841 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.smartdukaan.cron.scheduled;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;@Componentpublic class ScheduledSkeleton {private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);@AutowiredScheduledTasks scheduledTasks;@AutowiredNagiosMonitorTasks nagiosMonitorTasks;@AutowiredRunOnceTasks runOnceTasks;/** @Scheduled(cron = "0 5 0 * * * ") public void generateDailyRecharge() {* scheduledTasks.generateDailyRecharge(); }*//** @Scheduled(cron = "0 45 0 * * *") public void processScheme() throws* Exception { scheduledTasks.processScheme(); }*/@Scheduled(cron = "0 15 0 * * *")public void reconcileRecharge() throws Exception {scheduledTasks.reconcileRecharge();}@Scheduled(cron = "0 05 0 1,16 * ?")public void processRechargeCashback() throws Throwable {scheduledTasks.processRechargeCashback();}/** Value so big so that it got to run only once.**/@Scheduled(fixedDelay = 1000 * 60 * 10)public void migrateLineItems() throws Throwable {log.info("Started run Once");runOnceTasks.migarateLineItemsToNewTable();}/** @Scheduled(fixedRate=Integer.MAX_VALUE) public void runTwice() throws* Throwable { log.info("Started run Twice");* scheduledTasks.reconcileRecharge(); }*//** @Scheduled(fixedRate=Integer.MAX_VALUE) public void runThird() throws* Throwable { log.info("Started run Third");* scheduledTasks.processRechargeCashback(); }*/}