setupResignCronJob :: ServerEnv
                   -> StateComponent AcidState SecurityState
                   -> IO ()
setupResignCronJob env securityState =
    addCronJob (serverCron env) CronJob {
        cronJobName      = "Resign TUF data"
      , cronJobFrequency = DailyJobFrequency
      , cronJobOneShot   = False
      , cronJobAction    = do
          now <- getCurrentTime
          updateState securityState (ResignSnapshotAndTimestamp maxAge now)
      }
  where
    maxAge = 60 * 60 * 23 -- Don't resign if unchanged and younger than ~1 day
setupResignCronJob :: ServerEnv
                   -> StateComponent AcidState SecurityState
                   -> IO ()
setupResignCronJob env securityState =
    addCronJob (serverCron env) CronJob {
        cronJobName      = "Resign TUF data"
      , cronJobFrequency = DailyJobFrequency
      , cronJobOneShot   = False
      , cronJobAction    = do
          now <- getCurrentTime
          updateState securityState (ResignSnapshotAndTimestamp maxAge now)
      }
  where
    maxAge = 60 * 60 * 23 -- Don't resign if unchanged and younger than ~1 day
setupResignCronJob env securityState =
    addCronJob (serverCron env) CronJob {
        cronJobName      = "Resign TUF data"
      , cronJobFrequency = DailyJobFrequency
      , cronJobOneShot   = False
      , cronJobAction    = do
          now <- getCurrentTime
          updateState securityState (ResignSnapshotAndTimestamp maxAge now)
      }
  where
    maxAge = 60 * 60 * 23 -- Don't resign if unchanged and younger than ~1 day