mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix 35420, add run_on_start in build_schedule_item, remove redundancy of enabled
This commit is contained in:
parent
4f0b3be20c
commit
2d3a882cc2
2 changed files with 5 additions and 6 deletions
|
@ -359,15 +359,10 @@ def build_schedule_item(name, **kwargs):
|
|||
schedule[name]['splay'] = kwargs['splay']
|
||||
|
||||
for item in ['range', 'when', 'once', 'once_fmt', 'cron', 'returner',
|
||||
'return_config', 'return_kwargs', 'until', 'enabled']:
|
||||
'return_config', 'return_kwargs', 'until', 'run_on_start']:
|
||||
if item in kwargs:
|
||||
schedule[name][item] = kwargs[item]
|
||||
|
||||
# if enabled is not included in the job,
|
||||
# assume job is enabled.
|
||||
if 'enabled' not in kwargs:
|
||||
schedule[name]['enabled'] = True
|
||||
|
||||
return schedule[name]
|
||||
|
||||
|
||||
|
|
|
@ -117,6 +117,10 @@ def present(name,
|
|||
using the crontab format.
|
||||
Requires python-croniter.
|
||||
|
||||
run_on_start
|
||||
Whether the job will run when Salt minion start. Value should be
|
||||
a boolean.
|
||||
|
||||
function
|
||||
The function that should be executed by the scheduled job.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue