rundeck / rundeck

Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts
http://rundeck.org
Apache License 2.0
5.55k stars 922 forks source link

Add support for multiple schedule definitions with option values support. #828

Closed jlil closed 3 years ago

jlil commented 10 years ago

---Backstory--- The current implementation of Rundeck only allows one schedule per job with no support to pass option values for scheduled executions.

---Use case---

  1. Let's assume that we have a multi-tenancy application.
  2. We setup a rundeck job that takes the tenant name/id as a parameter and does some magic.

--Caveat--- I cannot schedule this job to run daily for tenant "ACME" and weekly for tenant "ACME2".

jlil commented 10 years ago

bump

gschueler commented 10 years ago

a workaround is to create two jobs that call the original job as a job reference. pass in the options as arguments to the job references, like: -tenant ACME (job A) and -tenant ACME2 (job B). If you set those jobs to be scheduled, you will get the desired effect.

jlil commented 10 years ago

@gschueler - thanks, but that is not really scalable when you have dozens of options. I am sure there are other use cases where this would be needed as well.

gschueler commented 10 years ago

it may be useful if schedules were independent of jobs. so you could define multiple schedules and options for the same job (cc @ahonor )

gschueler commented 9 years ago

Please vote for this on the roadmap if you want to see this feature: https://trello.com/c/WumO64lz

majkinetor commented 6 years ago

it may be useful if schedules were independent of jobs. so you could define multiple schedules and options for the same job

I usually have funky cases in my corp like this - Run every hour from 8-16 then run in 17:30 and then once in 23:55. This thing would fit this workflow perfectly. I suggest schedule option to be array or object. If object, its a single schedule, if array, its multiple.

Job independence of schedule is IMO wrong. Multiple shcedules per job is the right solution.