apoc.periodic.submit

Procedure APOC Core

apoc.periodic.submit('name',statement) - submit a one-off background statement

Signature

apoc.periodic.submit(name :: STRING?, statement :: STRING?) :: (name :: STRING?, delay :: INTEGER?, rate :: INTEGER?, done :: BOOLEAN?, cancelled :: BOOLEAN?)

Input parameters

Name Type Default

name

STRING?

null

statement

STRING?

null

Output parameters

Name Type

name

STRING?

delay

INTEGER?

rate

INTEGER?

done

BOOLEAN?

cancelled

BOOLEAN?

Usage Examples

CALL apoc.periodic.submit(
  "create-person",
  "CREATE (:Person {name: 'Michael Hunger'})"
);
Table 1. Results
name delay rate done cancelled

"create-person"

0

0

FALSE

FALSE

We can also schedule the task at a specific date or time, with the config {atTime: java.time.temporal.Temporal}, for example:

CALL apoc.periodic.submit(
  "create-person",
  "CREATE (:Person {name: 'Michael Hunger'})",
  {atTime: time("11:30")}
);