Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NATS scheduling feature #6381

Open
tamis-laan opened this issue Jan 17, 2025 · 0 comments
Open

NATS scheduling feature #6381

tamis-laan opened this issue Jan 17, 2025 · 0 comments
Labels
proposal Enhancement idea or proposal

Comments

@tamis-laan
Copy link

tamis-laan commented Jan 17, 2025

Proposed change

Something like this would be sooooo helpful:

ns = await nats.connect("localhost:4222")

await ns.cron.set("my_periodic_task_id", "*/1 * * * *", "my_topic",  "my message".encode())

await ns.cron.set("my_one-shot_task_id", "2025-04-20T18:40:00+02:00", "my_topic",  "my message".encode())

task = await ns.cron.get("my_one-shot_task_id")

await ns.cron.del("my_periodic_task_id")

When these tasks are one shot they should be automatically be removed after triggering and sending their message to the target topic.

Use case

In case we are dealing with timed events that need to be processed. For example when we are dealing with calendar (ical) events or having to send out emails etc...

Contribution

I'm not familiar with the NATS code base but would be happy to contribute with support.

@tamis-laan tamis-laan added the proposal Enhancement idea or proposal label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

1 participant