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

Fix 35420, add run_on_start in build_schedule_item #35586

Merged
merged 1 commit into from
Aug 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions salt/modules/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]


Expand Down
4 changes: 4 additions & 0 deletions salt/states/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down