Subversion Repositories SmartDukaan

Rev

Rev 34757 | Rev 34767 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34757 Rev 34762
Line 665... Line 665...
665
        LocalTime now = LocalTime.now();
665
        LocalTime now = LocalTime.now();
666
        LocalTime start = LocalTime.of(06, 0);
666
        LocalTime start = LocalTime.of(06, 0);
667
        LocalTime end = LocalTime.of(23, 0);
667
        LocalTime end = LocalTime.of(23, 0);
668
 
668
 
669
        if (now.isBefore(start) || now.isAfter(end)) {
669
        if (now.isBefore(start) || now.isAfter(end)) {
-
 
670
            System.out.println("Task skipped during restricted hours: " + now);
-
 
671
        } else {
670
            scheduledTasks.loanSettlement();
672
            scheduledTasks.loanSettlement();
671
            System.out.println("Task executed at " + now);
673
            System.out.println("Task executed at " + now);
672
        } else {
-
 
673
            System.out.println("Task skipped during restricted hours: " + now);
-
 
674
        }
674
        }
675
    }
675
    }
676
 
676
 
677
    @Scheduled(cron = "0 */15 * * * *")
677
    @Scheduled(cron = "0 */15 * * * *")
678
    public void ccAvenueSettlement() throws Throwable {
678
    public void ccAvenueSettlement() throws Throwable {