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
seccubus opened this Issue Nov 13, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@seccubus
Member

seccubus 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

@seccubus seccubus self-assigned this Nov 13, 2017

@seccubus seccubus changed the title from COntainer: Add parameter to only schedule if it is a certain day to Container: Add parameter to only schedule if it is a certain day Nov 13, 2017

seccubus added a commit that referenced this issue Nov 13, 2017

@seccubus seccubus closed this in 2f04bab Nov 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment