-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Scheduled *Service* jobs #2395
Comments
Duplicate #1944 |
I'm not quite sure I agree that it is a duplicate, but it is certainly linked. The other issue (#1944) is specifically for System jobs.. this is for scheduled Service jobs. |
@Daviey I don't have this use-case right now, but it seems very interesting. What kinds of problems is it meant to address? I could see a fit for dev or test environments that you want to tear down after-hours or on weekends. |
@stevenscg At the moment (pre-docker and Nomad), I have lots of cron jobs for starting and killing applications outside of business hours.. I'd like to get away from this... but it is currently really hard to model with Nomad without hacking/fudging it with the description I outlined. In addition, I could see a use-case for different teams (different apps) having reserved resources between certain hours to make better use of resources. |
@redi-walkerd For now I would probably just run a cron that ups/downs the count of the job during the hours you need |
We would like this as well. It would be grate if nomad could cron schedule a docker image, so we dont need to build cron into all our images. |
We also have a large number of services that should only be run during business hours. During business hours we'd want to retain existing nomad service capabilities such as restarting on task failure, but outside of business hours the service should be prevented from running. |
When using .hcl Nomadfiles - should I do those changes with |
We're also interested in this functionality. Scheduling business hours would be a huge plus for systems that connect to outside services that have defined maintenance systems, like financial exchange gateways. |
Noting that the Nomad Autoscaler has an issue which would cover this use case: There's no code in that issue, but there's a reference to a custom plugin repo with a "cron" scheduler: |
We are also looking for such a solution as it is a potential snag in our migration to Nomad. Our use case is similar to @ctc-santanaa operating in a financial services context where there is a well defined "end of day" which can vary per application and region. I have come across some work-arounds but all create a barrier to entry for us to migrate our existing jobs. |
Can confirm that this would be a very useful feature for our use-case: trading applications that are only required to be up and running during market hours. |
This is for sure a missing feature. Being able to plugin different calendars/periodic configs (ala airflow timetable) would make this a lot more useful for batch use cases vs other legacy competitors |
This was implemented via the |
I'm not seeing the fix in the BUSL'd version, can we keep this issue open until that capability is present? Considering I opened this issue nearly 8 years ago, I can keep waiting a bit longer. Thanks |
We implemented in Nomad Enterprise intentionally, as this sort of "governance" feature falls on a boundary line of where we decide to build in ENT vs CE editions. That being said, I'm remembering we still have it marked as "experimental", so maybe we'll see the light on that and get it into CE at some point (I can't promise anything on that front though). Re-opening for the time being. |
I'd like to be able to run Service jobs on a schedule. These differ from Periodic Batch jobs as they do not have an inbuilt end-state. A good example of this would be running a webserver (such as Apache) between the hours of 9:00-5:00 Monday-Friday.
The two workarounds I can currently think of are:
Service task, with 2 paired Periodic Batch job each to perform a 'nomad run' and 'nomad stop'. This feels pretty dirty and prone to issues, and will get complicated quickly with multiple jobs.
Run the webserver as a Batch job scheduling start, and have an inbuilt script (such as cron) that kills the entrypoint blocking process which terminates the container. This feels dirty because it will not be treated as a service, and the container will not be restarted on an unexpected failure.
I'd like to see a Time Scheduler in the Service job spec, but I i'm struggling to think of a way to express it.. Perhaps following cron standard:
simple start / stop:
Specific hours on days:
Limited days, fixed hours:
multi-day different times (might be a bit of a reach!):
The text was updated successfully, but these errors were encountered: