Interface ScheduledExecution


public interface ScheduledExecution
Execution metadata of a specific scheduled job.
  • Method Summary

    Modifier and Type
    Method
    Description
    The returned Instant is converted from the date-time in the default timezone.
    If the trigger represents a cron-based job with a timezone, then the returned Instant takes the timezone into account.
     
  • Method Details

    • getTrigger

      Trigger getTrigger()
      Returns:
      the trigger that fired the execution
    • getFireTime

      Instant getFireTime()
      The returned Instant is converted from the date-time in the default timezone. A timezone of a cron-based job is not taken into account.

      Unlike Trigger.getPreviousFireTime() this method always returns the same value.

      Returns:
      the time the associated trigger was fired
    • getScheduledFireTime

      Instant getScheduledFireTime()
      If the trigger represents a cron-based job with a timezone, then the returned Instant takes the timezone into account.

      For example, if there is a job with cron expression 0 30 20 ? * * * with timezone Europe/Berlin, then the return value looks like 2024-07-08T18:30:00Z. And Instant.atZone(java.time.ZoneId) for Europe/Berlin would yield 2024-07-08T20:30+02:00[Europe/Berlin].

      Returns:
      the time the action was scheduled for