Subversion Repositories SmartDukaan

Rev

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

Rev 36248 Rev 36254
Line 1197... Line 1197...
1197
                YearMonth yearMonth = YearMonth.now().minusMonths(1);
1197
                YearMonth yearMonth = YearMonth.now().minusMonths(1);
1198
                scheduledTasks.resendCNReport(yearMonth);
1198
                scheduledTasks.resendCNReport(yearMonth);
1199
            }
1199
            }
1200
            if (args.containsOption("genDNs")) {
1200
            if (args.containsOption("genDNs")) {
1201
                System.out.println("Calling genDNs");
1201
                System.out.println("Calling genDNs");
-
 
1202
                try {
1202
                String ymStr = args.getOptionValues("genDNs").isEmpty() ? null : args.getOptionValues("genDNs").get(0);
1203
                    String ymStr = args.getOptionValues("genDNs").isEmpty() ? null : args.getOptionValues("genDNs").get(0);
1203
                YearMonth yearMonth = ymStr != null ? YearMonth.parse(ymStr) : YearMonth.now().minusMonths(1);
1204
                    YearMonth yearMonth = ymStr != null ? YearMonth.parse(ymStr) : YearMonth.now().minusMonths(1);
-
 
1205
                    System.out.println("genDNs for " + yearMonth);
1204
                scheduledTasks.genDNs(yearMonth);
1206
                    scheduledTasks.genDNs(yearMonth);
-
 
1207
                    System.out.println("genDNs completed successfully");
-
 
1208
                } catch (Exception e) {
-
 
1209
                    System.err.println("genDNs FAILED: " + e.getMessage());
-
 
1210
                    e.printStackTrace(System.err);
-
 
1211
                }
1205
            }
1212
            }
1206
            System.exit(0);
1213
            System.exit(0);
1207
        }
1214
        }
1208
    }
1215
    }
1209
}
1216
}
1210
1217