Limiting concurrency on cron jobs? #1779
-
|
I'm trying to create a singleton cron job (TypeScript SDK). It looks like an Here's what I'm trying: const mytask = hatchet.task({
name: "my-task",
retries: 3,
on: {
cron: "* * * * *",
},
concurrency: {
maxRuns: 1,
limitStrategy: ConcurrencyLimitStrategy.CANCEL_NEWEST,
expression: "input",
},
fn: async () => {
}
})Run failed -> Input: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
hi @spiffytech, if you goal is just "global concurrency" a string key like "'gobal'" should work. |
Beta Was this translation helpful? Give feedback.
-
|
Not quite, there should be a sneaky single quote in there so global is treated as string within the cel: |
Beta Was this translation helpful? Give feedback.
Not quite, there should be a sneaky single quote in there so global is treated as string within the cel: