@Override
    public Void map(ResultSet rs) throws SQLException {

      while (rs.next()) {
        String taskName = rs.getString("task_name");
        Optional<Task> task = taskResolver.resolve(taskName, addUnresolvedToExclusionFilter);

        if (task.isEmpty() && !includeUnresolved) {
          if (addUnresolvedToExclusionFilter) {
            LOG.warn(
                "Failed to find implementation for task with name '{}'. Execution will be excluded from due. "
                    + "The scheduler normally delete unresolved tasks after 14d. To handle manually, "
                    + "either delete the execution from the database, or add an implementation for it. ",
                taskName);
          }
          continue;
        }

        String instanceId = rs.getString("task_instance");
        byte[] data = jdbcCustomization.getTaskData(rs, "task_data");

        Instant executionTime = jdbcCustomization.getInstant(rs, "execution_time");

        boolean picked = rs.getBoolean("picked");
        final String pickedBy = rs.getString("picked_by");
        Instant lastSuccess = jdbcCustomization.getInstant(rs, "last_success");
        Instant lastFailure = jdbcCustomization.getInstant(rs, "last_failure");
        int consecutiveFailures =
            rs.getInt("consecutive_failures"); // null-value is returned as 0 which is the preferred
        // default
        Instant lastHeartbeat = jdbcCustomization.getInstant(rs, "last_heartbeat");
        long version = rs.getLong("version");

        int priority = orderByPriority ? rs.getInt("priority") : 0;

        Supplier dataSupplier =
            memoize(
                () -> {
                  if (task.isEmpty()) {
                    // return the data raw if the type is not known
                    //  a case for standalone clients, with no "known tasks"
                    return data;
                  }
                  return serializer.deserialize(task.get().getDataClass(), data);
                });
        this.consumer.accept(
            new Execution(
                executionTime,
                new TaskInstance(taskName, instanceId, dataSupplier, priority),
                picked,
                pickedBy,
                lastSuccess,
                lastFailure,
                consecutiveFailures,
                lastHeartbeat,
                version));
      }

      return null;
    }
Instead of doing delete+insert, we allow updating an existing execution will all new fields

@return the execution-time of the new execution
db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/jdbc/JdbcTaskRepository.java