Skip to content

Conversation

thesvistun
Copy link

Could be used in Scheduler field as a commented line. In this field comments follow a sharp sign (#).
So start each param line with the sign.

Syntax:
@param [value]

Parameters are applied to a cron item above which they are listed. These parameters values override ones of default job parameters. No quotes are needed in case a parameter value contains whitespaces. A parameter value may be omitted. In this case it will be assumed as an empty one.

Could be used in Scheduler field as a commented line.
In this field comments follow a sharp sign (#).
So start each param line with the sign.

Syntax:
  @param <name> [value]

Parameters are applied to a cron item above which they are listed.
These parameters values override ones of default job parameters.
No quotes are needed in case a parameter value contains whitespaces.
A parameter value may be omitted. In this case it will be assumed as an empty one.
@TonyNoble
Copy link
Contributor

Hi @thesvistun ,

Thanks for the PR, I just wanted to clarify what it is you're wanting to do here? Are the params to be passed to the scripts that determine whether or not the job should run? Or are they params that should be set for the resultant triggered job?

I think it's a good idea to be able to override the default params of triggered jobs, but I'm not convinced that abusing the scheduling field is the best approach. If you could give some more detail on the use-case and decisions behind your approach, it would be much appreciated

@thesvistun
Copy link
Author

Hi @TonyNoble !
Thank you for your attention to the PR.

It is not about making decision whether a job needs to be run or not. Parameters should be passed to the triggered job.

In general our requirements look like: we have a matrix job that has to be triggered several times a day. This job has to be able to run different set of configurations supplied through its matrix parameter. Other parameters may differ as well through the timetable. That is it.

Without changes in this plugin I'm able to parse additional fields got from cron tab right in Groovy script, then to store parsed parameters in a file through which the plugin allows us to override default values of job parameters.

But I thought you could be interested in the feature embedded in the plugin.

@thesvistun
Copy link
Author

And yes, using a Scheduler field for the purpose is not a briliant idea. Not terrible on the other hand. So I thought it has a chance to be applied here before some other solution will come.

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

Successfully merging this pull request may close these issues.

2 participants