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

Container: Add parameter to only schedule if it is a certain day #605

Closed
MrSeccubus opened this issue Nov 13, 2017 · 0 comments
Closed

Container: Add parameter to only schedule if it is a certain day #605

MrSeccubus opened this issue Nov 13, 2017 · 0 comments
Assignees

Comments

@MrSeccubus
Copy link
Member

@MrSeccubus MrSeccubus commented Nov 13, 2017

In order to do "First Monday of the month" type scheduling in Kubernetes I would like the scan command in a container to accept a third parameter that instructs the container to only run the scan if today is a Mon, Tue, , etc.

Rationel: Like corn, Kubernetes cronjobs interpret the schedule 0 1 1-7 * Mon cmd as run cmd at 01:00 on day 1 through 7 of the month AND every Monday.

Normally this get's fixed in cron as: 0 1 1-7 * * [ "$(date '+\%a')" == "Mon" ] && cmd, but that is hard to do in Kubernetes. So we need to incorportate the [ "$(date '+\%a')" == "Mon" ] && function into entrypoint.sh

@MrSeccubus MrSeccubus self-assigned this Nov 13, 2017
@MrSeccubus MrSeccubus changed the title COntainer: Add parameter to only schedule if it is a certain day Container: Add parameter to only schedule if it is a certain day Nov 13, 2017
MrSeccubus added a commit that referenced this issue Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant