Subversion Repositories SmartDukaan

Rev

Rev 23866 | Rev 24121 | 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.monitored.NagiosMonitorTasks;

@Component
public class ScheduledSkeleton {

        private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);

        @Autowired
        ScheduledTasks scheduledTasks;

        @Autowired
        NagiosMonitorTasks nagiosMonitorTasks;

        @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(cron = "0 0 9 * * *")
        public void migrateLineItems() throws Throwable {
                log.info("Started run Once");
                scheduledTasks.sendPartnerInvestmentDetails();
        }
}