Subversion Repositories SmartDukaan

Rev

Rev 31931 | Rev 32048 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.smartdukaan.cron.scheduled;

import com.smartdukaan.cron.migrations.RunOnceTasks;
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
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 java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.LinkedHashMap;

@Component
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
public class ScheduledSkeleton {

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

        @Autowired
        private ScheduledTasks scheduledTasks;

        @Autowired
        private LeadSyncRunner leadSyncRunner;

        @Autowired
        private Reconciliation reconciliation;

        @Autowired
        private RunOnceTasks runOnceTasks;

        @Autowired
        NagiosMonitorTasks nagiosMonitorTasks;

        @Autowired
        private TicketRelatedScheduledTask ticketRelatedScheduledTask;

        @Autowired
        private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;

        @Autowired
        private WriteToPropertiesFile writeToPropertiesFile;

        String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";

        @Scheduled(cron = "0 0 2 * * *")
        public void processDailySchemes() throws Exception {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("processDailySchemes", "0");

                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
                int maxMinusDays = 5;
                int currentDayOfMonth = LocalDate.now().getDayOfMonth();
                int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
                if (minusDays > 0) {
                        scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
                }
                propertiesDetails.put("processDailySchemes", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 15 0 * * *")
        public void runOnceTasks() throws Exception {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("runOnceTasks", "0");

                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.reconcileRecharge();

                propertiesDetails.put("runOnceTasks", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
        }

        /*
         * @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
         * throws Exception { runOnceTasks.mailDashboardScreenshots(); }
         */

        @Scheduled(cron = "0 05 0 1,16 * ?")
        public void processRechargeCashback() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("processRechargeCashback", "0");

                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
                scheduledTasks.processRechargeCashback();

                propertiesDetails.put("processRechargeCashback", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 6 * * *")
        public void sendPartnerInvestmentDetails() throws Exception {
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("sendPartnerInvestmentDetails", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
                scheduledTasks.sendPartnerInvestmentDetails();
                long secs = (new Date().getTime()) / 1000;
                log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());

                propertiesDetails.put("investmentDate", Long.toString(secs));
                propertiesDetails.put("sendPartnerInvestmentDetails", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 10,15,17 * * *")
        public void sendIndentTertiaryReport() throws Exception {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("sendIndentTertiaryReport", "0");

                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.sendIndentTertiary();

                propertiesDetails.put("sendIndentTertiaryReport", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 6 * * *")
        public void checkPartnerActiveStoreByStatus() throws Exception {
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");

                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.checkPartnerActiveStore();
                propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        // @Scheduled(cron = "0 0 8 * * *")
        public void sendStockAgeingReport() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("sendStockAgeingReport", "0");

                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.sendAgeingReport();

                propertiesDetails.put("sendStockAgeingReport", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 11 * * *")
        public void escalateTicket() throws Exception {
                log.info("escalate ticket");
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("escalateTicket", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
                ticketRelatedScheduledTask.escalateTicket();

                propertiesDetails.put("escalateTicket", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 11 * * *")
        public void alertTicketToUser() throws Exception {
                log.info("alert for ticket");
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("alertTicketToUser", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                ticketRelatedScheduledTask.alertforTicket();
                propertiesDetails.put("alertTicketToUser", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 14,18,23 ? * *")
        public void dailySaleNotification() throws Exception {
                log.info("daily send Notification");
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("dailySaleNotification", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.sendDailySalesNotificationToPartner(null);

                propertiesDetails.put("dailySaleNotification", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        /*
         * @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
         * Exception { reconciliation.dailyReconciliation(); }
         */

        @Scheduled(cron = "0 0 1 * * *")
        public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
                log.info("selectFinServiceFollowUpDateByCurrDate");
                scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());

        }

        @Scheduled(cron = "0 0 2 * * *")
        public void processActivation() throws Exception {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("processActivation", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.processActivation();

                propertiesDetails.put("processActivation", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        // TODO: Change it back to first of every month
        // @Scheduled(cron = "0 0 1 1 * *")
        @Scheduled(cron = "0 0 1 2 * *")
        public void rollOutUpgardedMargins() throws Exception {
                scheduledTasks.rollOutUpgardedMarginsNextMonth();

        }

        @Scheduled(cron = "0 */5 * * * *")
        public void sendNotification() throws Throwable {

                log.info("send Notification");
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("sendNotification", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.sendNotification();
                propertiesDetails.put("sendNotification", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
                log.info("send Notification Done");

        }

        @Scheduled(cron = "0 */15 * * * *")
        public void checkRazorPayPaymentStatus() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("checkRazorPayPaymentStatus", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.checkRazorPayPaymentStatus();
                propertiesDetails.put("checkRazorPayPaymentStatus", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(fixedDelay = 30 * 60 * 1000)
        public void updateIrnsToInvoices() throws Throwable {
                runOnceTasks.updateIrnsToInvoices();
        }

        // No longer needed
        // @Scheduled(cron = "0 */10 * * * *")
        public void attachToffeeInvoices() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("attachToffeeInvoices", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.attachToffeeInvoices();

                propertiesDetails.put("attachToffeeInvoices", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 5 * * *")
        public void ticketClosed() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("ticketClosed", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.ticketClosed();

                propertiesDetails.put("ticketClosed", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 8 * * *")
        public void checkfocusedModelInPartnerStock() throws Throwable {
                log.info("startTime" + LocalDateTime.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.checkfocusedModelInPartnerStock();
                propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
        public void notifyLead() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("notifyLead", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.notifyLead();

                propertiesDetails.put("notifyLead", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                // scheduledTasks.notifyVisits();
        }

        // No longer scheduled
        // @Scheduled(cron = "0 0 1 * * *")
        public void fetchImeiActivation() throws Throwable {
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("fetchImeiActivation", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                runOnceTasks.fetchImeiActivation(0);

                propertiesDetails.put("fetchImeiActivation", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 1 * * *")
        public void checkValidateReferral() throws Throwable {
                log.info("startTime" + LocalDateTime.now());
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("checkValidateReferral", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.checkValidateReferral();

                propertiesDetails.put("checkValidateReferral", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        // @Scheduled(cron = "0 0 8 * * *")
        public void partnerProblemAlert() throws Throwable {
                log.info("startTime" + LocalDateTime.now());
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("partnerProblemAlert", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.partnerProblemAlert();
                propertiesDetails.put("partnerProblemAlert", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        /*
         * @Scheduled(cron = "0 30 10 * * MON-SAT") public void
         * sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
         * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
         * LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
         * writeToPropertiesFile.saveParamChanges(propertiesDetails,
         * nagiosCronPropertiesFile);
         * 
         * scheduledTasks.sendAttendanceMorningAlert();
         * propertiesDetails.put("sendMorningAttendanceAlert", "1");
         * writeToPropertiesFile.saveParamChanges(propertiesDetails,
         * nagiosCronPropertiesFile);
         * 
         * log.info("endTime" + LocalDateTime.now()); }
         * 
         * @Scheduled(cron = "0 30 20 * * MON-SAT") public void
         * sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
         * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
         * LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
         * writeToPropertiesFile.saveParamChanges(propertiesDetails,
         * nagiosCronPropertiesFile);
         * 
         * scheduledTasks.sendAttendanceEveningAlert();
         * propertiesDetails.put("sendEveningAttendanceAlert", "1");
         * writeToPropertiesFile.saveParamChanges(propertiesDetails,
         * nagiosCronPropertiesFile);
         * 
         * log.info("endTime" + LocalDateTime.now()); }
         */

        @Scheduled(cron = "0 0 7 * * *")
        public void onboardingEventDelays() throws Throwable {
                log.info("startTime" + LocalDateTime.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("onboardingEventDelays", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.onboardingEventDelays();

                propertiesDetails.put("onboardingEventDelays", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 8 * * *")
        public void brandingAlert() throws Throwable {
                log.info("startTime" + LocalDateTime.now());
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("brandingAlert", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.brandingAlert();
                propertiesDetails.put("brandingAlert", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 8 * * *")
        public void advancePaymentPendingAlert() throws Throwable {
                log.info("startTime" + LocalDateTime.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("advancePaymentPendingAlert", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
                propertiesDetails.put("advancePaymentPendingAlert", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 8 * * *")
        public void fullPaymentPendingAlert() throws Throwable {
                log.info("startTime" + LocalDateTime.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("fullPaymentPendingAlert", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();

                propertiesDetails.put("fullPaymentPendingAlert", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 9 * * *")
        public void advancePaymentPendinglegalAlert() throws Throwable {
                log.info("startTime" + LocalDateTime.now());
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();

                propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 */5 * * * *")
        public void onBoardingCompleteEventEmail() throws Throwable {
                log.info("startTime" + LocalDateTime.now());
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("onBoardingCompleteEventEmail", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
                propertiesDetails.put("onBoardingCompleteEventEmail", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 */5 * * * *")
        public void updateSaholicCISTable() throws Throwable {
                log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
                runOnceTasks.updateSaholicCISTable();
                log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
        }

        @Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
        public void fetchPartnerStat() throws Throwable {
                scheduledTasks.fetchParnterStats();
        }

        @Scheduled(cron = "0 0 9 * * *")
        public void storeTimelinePromoterPending() throws Throwable {
                log.info("startTime" + LocalDateTime.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("storeTimelinePromoterPending", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
                propertiesDetails.put("storeTimelinePromoterPending", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 23 * * *")
        public void checkItelImeiActivation() throws Throwable {
                log.info("startTime" + LocalDate.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("checkItelImeiActivation", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
                log.info("startTimecheckItelImeiActivation" + LocalDate.now());
                scheduledTasks.checkItelImeiActivation(LocalDate.now(), 90);
                long secs = (new Date().getTime()) / 1000;
                log.info("endTimecheckItelImeiActivation" + LocalDate.now());
                propertiesDetails.put("checkItelImeiActivation", "1");
                propertiesDetails.put("itelDate", Long.toString(secs));
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 23 * * *")
        public void checkTecnoImeiActivation() throws Throwable {

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("checkTecnoImeiActivation", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("startTime" + LocalDate.now());
                log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
                scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 90);
                log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());

                long secs = (new Date().getTime()) / 1000;
                propertiesDetails.put("checkTecnoImeiActivation", "1");
                propertiesDetails.put("technoDate", Long.toString(secs));
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(fixedDelay = 60 * 1000)
        public void vivoImeiActivation() throws Throwable {
                log.info("startTimevivoImeiActivation" + LocalDateTime.now());

                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("vivoImeiActivation", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                scheduledTasks.checkImeiActivation();
                long secs = (new Date().getTime()) / 1000;
                log.info("endTimevivoImeiActivation" + LocalDateTime.now());
                propertiesDetails.put("vivoImeiActivation", "1");

                propertiesDetails.put("vivoDate", Long.toString(secs));
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

        }

        @Scheduled(cron = "0 0 8 * * *")
        public void reviewUncontactablePartner() throws Throwable {
                log.info("startTime" + LocalDateTime.now());

                scheduledTasks.reviewUncontactablePartner();

        }

        @Autowired
        private StandAlone standAlone;

        // @Scheduled(fixedDelay = 60 * 1000)
        public void oppo() throws Throwable {
                standAlone.checkOppoImeiStatus();
        }

        @Scheduled(cron = "0 0 * * * *")
        public void markBlueDartOrderDelivered() throws Throwable {
                log.info("startTime" + LocalDateTime.now());
                scheduledTasks.markBlueDartOrderDelivered();
                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 * * * *")
        public void markDelhiveryOrderDelivered() throws Throwable {
                LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
                propertiesDetails.put("markDelhiveryOrderDelivered", "0");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("startTime" + LocalDateTime.now());
                scheduledTasks.markDelhiveryOrderDelivered();
                propertiesDetails.put("markDelhiveryOrderDelivered", "1");
                writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);

                log.info("endTime" + LocalDateTime.now());
        }

        @Scheduled(cron = "0 0 4 * * *")
        public void processPriceDrop() throws Throwable {
                scheduledTasks.processPriceDrop();
        }

        @Scheduled(cron = "0 0 0 * * *")
        public void calculateInterestAccured() throws Throwable {
                scheduledTasks.calculateInterestAccured();
        }

        @Scheduled(cron = "0 */5 2-22 * * *")
        public void loanSettlement() throws Throwable {
                scheduledTasks.loanSettlement();
        }

        @Scheduled(cron = "0 */15 * * * *")
        public void ccAvenueSettlement() throws Throwable {
                scheduledTasks.settleCCAvePayments();
        }

        @Scheduled(cron = "0 0 6 * * *")
        public void dailyLoanAlert() throws Throwable {
                scheduledTasks.dailyLoanAlert();
        }

        @Scheduled(cron = "0 0 1 * * *")
        public void processActivatedImeisForSchemes() throws Throwable {
                scheduledTasks.processActivatedImeisForSchemes();
        }

        @Scheduled(cron = "0 0 7 * * *")
        public void updatePartnerLimit() throws Throwable {
                scheduledTasks.updatePartnerLimit();
        }

        @Scheduled(cron = "0 0 7 * * *")
        public void alertForDueDate() throws Throwable {
                scheduledTasks.alertForDueDate();
        }

        @Scheduled(cron = "0 0 8 * * *")
        public void notifyLoanDueDateCross() throws Throwable {
                scheduledTasks.notifyLoanDueDateCross();
        }

        @Scheduled(cron = "0 0 9 * * *")
        public void notifyDefaultLoans() throws Throwable {
                scheduledTasks.notifyDefaultLoans();
        }

        @Scheduled(cron = "0 0 23 * * *")
        public void hygineAlertForInternalTeam() throws Throwable {
                scheduledTasks.hygineAlertForInternalTeam();

        }

        @Scheduled(cron = "0 0 23 * * *")
        public void hygineAlertForPartner() throws Throwable {
                scheduledTasks.hygineAlertForPartner();

        }

        @Scheduled(cron = "0 0 0 * * MON")
        public void monthlyTargetForPartner() throws Throwable {
                scheduledTasks.monthlyTargetForPartner();

        }

        @Scheduled(cron = "0 0 0 * * MON")
        public void monthlyTargetForInternalTeam() throws Throwable {
                scheduledTasks.monthlyTargetForInternalTeam();

        }

        @Scheduled(cron = "0 0 6 * * *")
        public void sendSamsungRebilling() throws Throwable {
                scheduledTasks.sendMailForSamsungRebilling();
        }

        @Scheduled(cron = "0 10 8 * * *")
        public void sendMailForAgeingAlert() throws Throwable {
                scheduledTasks.sendMailForAgeingAlert();
        }
        /*
         * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
         * throws Throwable { log.info("startTime" + LocalDateTime.now());
         * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
         * log.info("endTime" + LocalDateTime.now()); }
         */
}