Subversion Repositories SmartDukaan

Rev

Rev 37595 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37595 Rev 37642
Line 70... Line 70...
70
            scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
70
            scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
71
        }
71
        }
72
 
72
 
73
    }
73
    }
74
 
74
 
75
    /** Daily 00:20: re-index models whose hot-deal window opened today or closed yesterday. */
-
 
76
    @Scheduled(cron = "0 20 0 * * *")
-
 
77
    public void syncHotDealFlags() throws Exception {
-
 
78
        try {
-
 
79
            scheduledTasks.syncHotDealFlags();
-
 
80
        } catch (Exception e) {
-
 
81
            log.error("syncHotDealFlags failed", e);
-
 
82
        }
-
 
83
    }
-
 
84
 
-
 
85
    @Scheduled(cron = "0 15 0 * * *")
75
    @Scheduled(cron = "0 15 0 * * *")
86
    public void runOnceTasks() throws Exception {
76
    public void runOnceTasks() throws Exception {
87
 
77
 
88
        scheduledTasks.reconcileRecharge();
78
        scheduledTasks.reconcileRecharge();
89
 
79
 
Line 687... Line 677...
687
    public void refreshAgedStockDaily() throws Throwable {
677
    public void refreshAgedStockDaily() throws Throwable {
688
        batchScheduledTasks.refreshAgedStockDaily();
678
        batchScheduledTasks.refreshAgedStockDaily();
689
        batchScheduledTasks.updatePartnerLimitWithBatch();
679
        batchScheduledTasks.updatePartnerLimitWithBatch();
690
    }
680
    }
691
 
681
 
-
 
682
    /**
-
 
683
     * Hourly at :40 — close out batches left RUNNING by a run that died mid-loop, so they
-
 
684
     * raise their alert and stop blocking the job from running again. No-ops when clean.
-
 
685
     */
-
 
686
    @Scheduled(cron = "0 40 * * * *")
-
 
687
    public void reapStaleCronBatches() {
-
 
688
        try {
-
 
689
            batchScheduledTasks.reapStaleBatches();
-
 
690
        } catch (Exception e) {
-
 
691
            log.error("reapStaleBatches failed: {}", e.getMessage(), e);
-
 
692
        }
-
 
693
    }
-
 
694
 
692
    @Scheduled(cron = "0 0 9,14,18 * * *")
695
    @Scheduled(cron = "0 0 9,14,18 * * *")
693
    public void createOpeningStockPartyWise() throws Throwable {
696
    public void createOpeningStockPartyWise() throws Throwable {
694
        scheduledTasks.createOpeningStockPartyWise();
697
        scheduledTasks.createOpeningStockPartyWise();
695
    }
698
    }
696
 
699