-
Hey 👋🏼 ! First off, congrats on building this, looks super nice — docs are great. :) And the Pro option looks neat as well. I had a question about unique jobs, and how to maintain them. My idea was that I'd have a client would submit my "unique" jobs every time the process starts. The jobs are of a cronjob-like nature (let's say a key-rotation thing that I want to run every 3 months) and I want only one to be running. But instead of writing a one-of-script to create them, I would do it in my app startup to have a place where I maintain them. Is this currently possible? Or would I be better off with a one of script that takes care of them? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@till Thanks! Did you see the https://riverqueue.com/docs/periodic-jobs#basic-usage I'm not sure I totally grok what you want here, but are you asking whether River would be able to manage and guarantee the once every three months schedule? If so, no it definitely can't do that at the moment. |
Beta Was this translation helpful? Give feedback.
Ah gotcha. You can combine periodic jobs with unique jobs, and unique jobs have a
ByPeriod
argument that lets you specify the period over which they're unique. That said though, it doesn't have a perfectly granular schedule for such. It's a duration like "unique every 15 minutes" or "unique every hour".