Rerunning an expected crontab for a given date #43007
Unanswered
austinkregel
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
TL;DR; Would being able to re-run a crontab/defined schedule be of benefit to your usage?
My team has encountered the need, more than once, to rerun a whole day or week's worth of cron jobs (either for data fetching, report building, or data manipulation). I've been attempting to implement the functionality to rerun a cron schedule, and I have the whole schedule working. However, we quickly ran into the issue of not needing to run the entire cron, but only parts of the cron. Which I think gave me a decent idea.
Cron scheduler tags/labels/groups. Or otherwise associating a string with a given cron event, and being able to choose to only re-run crons with that same string.
Essentially, the whole idea of the feature is based around this little bit of code to rerun a cron schedule as if it were running in real time.
The part that seems to be impractical as a package, is adding the tags method to the framework so you could use a schedule like this
I'm able to extend the code to the point of being able to use the above code locally, however creating my own version of
schedule:run
command results in the schedule being empty (or otherwise not bound to my new schedule run command). However, modifying the existingschedule:run
command at this line with the below code will do exactly as I'm expecting and launch all the jobs that are tagged with the provided tag.I'm adding a small enough amount of code for the overall feature that I'd happily make a PR to fully flush this out if there's interest.
Beta Was this translation helpful? Give feedback.
All reactions