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

[FEATURE] - Support for an AtTimes job #740

Closed
rbroggi opened this issue Jun 21, 2024 · 0 comments · Fixed by #741
Closed

[FEATURE] - Support for an AtTimes job #740

rbroggi opened this issue Jun 21, 2024 · 0 comments · Fixed by #741
Labels
enhancement New feature or request

Comments

@rbroggi
Copy link
Contributor

rbroggi commented Jun 21, 2024

Is your feature request related to a problem? Please describe

In some instances I would like to schedule future jobs to be run at specific times. Those could be totally or only partially in the future (in case of an engine restart in the middle of the schedule). For convenience reasons, it can be way easier to define an AtTimes job rather than a dedicated cron-schedule if the input from another system is a limited list of times.

Describe the solution you'd like

a new type of job that can be invoked similarly to the other, something like:

// OneTimeJob is to run a job once at a specified time and not on
// any regular schedule.
func AtTimesTimeJob(atTimes ...time.Time) JobDefinition

Describe alternatives you've considered

Multiple schedules with OneTimeJob is an alternative to the above. I find it less convenient and worse case the AtTimes should be a more generic way to implement also the OneTimeJob.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant