Skip to content

Commit

Permalink
Set cron to evening and fix date range
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhofmann committed Sep 23, 2024
1 parent d721071 commit ca62794
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void main(String[] args) throws IOException {
SpringApplication.run(OaiImporterWebApplication.class, args);
}

@Scheduled(fixedDelay = 300000, initialDelay = 3000)
@Scheduled(cron = "0 30 23 * * *")
public void test() {
configuration.getJobs().entrySet().stream()
.filter(job -> job.getValue().isAuto())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public String buildLink(SRUConfiguration source, LocalDate day, int startRecord,
}

public List<LocalDate> getDaysSince(LocalDate since, LocalDate until) {
LocalDate now = until == null ? LocalDate.now() : until.plusDays(1);
LocalDate now = until == null ? LocalDate.now().plusDays(1) : until.plusDays(1);
return since.datesUntil(now).toList();
}

Expand Down

0 comments on commit ca62794

Please sign in to comment.