Skip to content

Dynamic cron schedules #1237

Answered by bensheldon
abrunner94 asked this question in Q&A
Feb 9, 2024 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Unfortunately GoodJob doesn't have anything like that, and I don't think it's a good fit for GoodJob. GoodJob's cron all lives together in memory in each process, so each cron entry uses a little bit of memory and uses a little bit of CPU when it runs; it's not intended to be unbounded or dynamic

I'd imagine if you wanted something like this, that you'd build your own scheduler-like-behavior as part of your application: Run a job every minute, query for records that would be expected to run, run them, and then mark them as run until their next tick (e.g. just keep bumping their last_run_at and next_run_at)

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bensheldon
Comment options

@abrunner94
Comment options

@bensheldon
Comment options

Answer selected by abrunner94
@abrunner94
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants