Class GuiceDailyDaemon

All Implemented Interfaces:
GuiceLifecycleListener, StoppableService, Runnable

public abstract class GuiceDailyDaemon extends GuiceScheduledDaemon
A recurring daemon that runs once a day (although it can be triggered to run early)
  • Constructor Details

    • GuiceDailyDaemon

      public GuiceDailyDaemon(@NotNull @NotNull LocalTime defaultTime)
  • Method Details

    • setTimeFromConfigIfSet

      @Inject public void setTimeFromConfigIfSet(GuiceConfig config)
      Overrides the default time set in the constructor with the value from the application config (if set)
      Parameters:
      config -
      Throws:
      DateTimeParseException - if the LocalTime stored in config is invalid
    • getScheduledTime

      public LocalTime getScheduledTime()
      Returns the time this daemon is configured to run at
      Returns:
    • getNextRunTime

      @NotNull public @NotNull Instant getNextRunTime()
      Specified by:
      getNextRunTime in class GuiceScheduledDaemon