neo4j / apoc

Apache License 2.0
102 stars 30 forks source link

add crontab like job-control #154

Open neo-technology-build-agent opened 2 years ago

neo-technology-build-agent commented 2 years ago

Issue by jexp Thursday Apr 20, 2017 at 13:27 GMT Originally opened as https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/404


apoc.periodic.schedule -> allow cron-like-expressions

apoc.periodic.at('name', statement, 'cron-like-expression')

neo-technology-build-agent commented 2 years ago

Comment by albertodelazzari Monday May 22, 2017 at 13:25 GMT


@jexp can we use a library like quartz scheduler? Or anything else?

neo-technology-build-agent commented 2 years ago

Comment by jexp Monday May 22, 2017 at 20:43 GMT


Quartz is quite a monster :) perhaps there is something more lightweight?

I mean after all it is just parsing the cron expression and starting with the necessary delay + interval in the scheduled thread pool?

Michael

Am 22.05.2017 um 15:25 schrieb Alberto De Lazzari notifications@github.com:

@jexp can we use a library like quartz scheduler? Or anything else?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

neo-technology-build-agent commented 2 years ago

Comment by albertodelazzari Tuesday May 23, 2017 at 07:29 GMT


@jexp there is something lightweight, maybe we can get some idea for the "crontab-expression" from this project: http://www.sauronsoftware.it/projects/cron4j/index.php and then use simple java schedulers.

In details I am talking about this: http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html

The project is free, what do you think?

neo-technology-build-agent commented 2 years ago

Comment by jexp Sunday May 28, 2017 at 19:13 GMT


Sounds good.

But I'm currently rethinking if this is a good idea in the first place, or if this isn't something that should live outside of the database?

neo-technology-build-agent commented 2 years ago

Comment by ikwattro Sunday May 28, 2017 at 20:34 GMT


Also the lib latest release dates back in 2013 ?

http://www.sauronsoftware.it/projects/cron4j/download.php

https://mvnrepository.com/artifact/it.sauronsoftware.cron4j/cron4j

neo-technology-build-agent commented 2 years ago

Comment by albertodelazzari Monday May 29, 2017 at 07:09 GMT


@ikwattro I think so but we only want to take the "interesting" part of it, in particular I'm talking about the cron expression parser.

@jexp in my opinion it's better to let this piece outside of the database if we are talking about only scheduling any cypher query we want to run at specific time.

neo-technology-build-agent commented 2 years ago

Comment by emregency Tuesday Dec 24, 2019 at 16:57 GMT


@jexp is it still something that you consider? Would you recommend apoc.periodic.schedule as a start to implement cron-like jobs?