Subversion Repositories SmartDukaan

Rev

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

Rev 34762 Rev 34767
Line 661... Line 661...
661
    //  @Scheduled(cron = "0 */5 2-22 * * *")
661
    //  @Scheduled(cron = "0 */5 2-22 * * *")
662
    @Scheduled(fixedDelay = 1 * 60 * 1000)
662
    @Scheduled(fixedDelay = 1 * 60 * 1000)
663
    //@Scheduled(cron = "0 0 23 * * *")
663
    //@Scheduled(cron = "0 0 23 * * *")
664
    public void loanSettlement() throws Throwable {
664
    public void loanSettlement() throws Throwable {
665
        LocalTime now = LocalTime.now();
665
        LocalTime now = LocalTime.now();
666
        LocalTime start = LocalTime.of(06, 0);
666
        LocalTime start = LocalTime.of(9, 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);
670
            System.out.println("Task skipped during restricted hours: " + now);
671
        } else {
671
        } else {