code: public static <T> JobInfo submit(String name, Runnable task) {
          JobInfo info = new JobInfo(name);
          Future<T> future = list.remove(info);
          if (future != null && !future.isDone()) future.cancel(false);
  
          Future newFuture = Pools.SCHEDULED.submit(task);
          list.put(info,newFuture);
          return info;
      }
docs: Call from a procedure that gets a <code>@Context GraphDatbaseAPI db;</code> injected and provide that db to the runnable.