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

adding optional environment #243

Closed
wants to merge 1 commit into from
Closed

Conversation

richir-sunet
Copy link
Contributor

No description provided.

@richir-sunet
Copy link
Contributor Author

Tested, and it seem to work as expected. 👍

  sunet::scriptherder::cronjob { 'backupbuckets':
    cmd           => '/root/tasks/backupbuckets.sh',
    environment   => ['RICHIR_TEST=true', 'OTHER_RICHIR=false'],
    hour          => '2',
    minute        => '0',
    ok_criteria   => ['exit_status=0','max_age=2d'],
    warn_criteria => ['exit_status=1','max_age=3d'],
  }

became

# Puppet Name: backupbuckets
RICHIR_TEST=true
OTHER_RICHIR=false
0 2 * * * /usr/local/bin/scriptherder --mode wrap --syslog --name backupbuckets -- /root/tasks/backupbuckets.sh

@richir-sunet richir-sunet deleted the richir-env-conf-for-cron branch January 23, 2025 14:42
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.

1 participant