Apoc.periodic.repeat issue!

Hi there,

I am pretty new to Neo4j. I'm trying to update a graph with apoc.periodic.repeat, but it doesn't seem to work. Here is a mock example:

- I created nodes for few countries with MERGE (co:Country {id: #, capital: "capital city"}

- Then I created cities with MATCH (co:Country) MERGE (c:City {name: co.capital })

I created more countries than cities to test apoc.periodic.repeat. Then I ran the following:

CALL apoc.periodic.repeat("create-cities",

"MATCH (co:Country) MERGE (c:City {name: co.capital})", 1)

This doesn't create new nodes with City label. The result is attached. I'm not sure why it says "false" under done. Can someone please explain why this is not producing the expected outcome? Is there another way to achieve the desired outcome?

Thanks

Hmm it should run once every 1 second and create the new nodes.

Is that what you're actually trying to do?

Did you try to run :queries or call dbms.listQueries() to see if it's running?

Just tried it, works for me.

I ran :queries and found that multiple jobs were running in the background, and I guess they prevented this job from running. I killed them all and now it works! Thanks a lot for your response :slightly_smiling_face: