Background Jobs

Qualified Name Type


apoc.periodic.list - list all jobs



apoc.periodic.submit(name String, statement String, params Map<String, Any>) - creates a background job which runs the given Cypher statement once.



apoc.periodic.repeat(name String, statement String, rate Integer, config Map<String, Any>)- runs a repeatedly called background job. To stop this procedure, use apoc.periodic.cancel. returns 0.


  • The jobs list is updated every 10s for finished jobs.

Additional configuration

Many procedures run in the background or asynchronously. The following setting overrides the default thread pool size (processors*2):

Many periodic procedures rely on a scheduled executor that has a pool of threads with a default fixed size (processors/4, at least 1). To configure the pool size, use the following configuration property:

Countdown Example

This statement repeats until the termination is reached. The statement must return a numeric value and it should decrement (similar to a monotonically decreasing function). When the return value reaches 0 the iteration stops.

For example, to define a counter with a numeric property, use the following command:

CREATE (counter:Counter) SET counter.c = 10

To decrement this property by 1 each second, use the following command:

CALL apoc.periodic.countdown('decrement',"MATCH (counter:Counter) SET counter.c = counter.c - 1 RETURN counter.c as count", 1)