There are also static methods
Jobs.schedule, which can be used from other procedures.
The jobs list is checked / cleared every 10s for finished jobs.
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:
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)
Was this page helpful?