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

Add no-constraint option #293

Conversation

frontiersnorth-user
Copy link

@frontiersnorth-user frontiersnorth-user commented Mar 23, 2020

make:task --constraint default to 'weekdays'. If one does not want a constraint at all, for example if they want it to run every day, there was no way to do this since the code in replaceConstraint simply replaces DummyConstraint with whatever is provided. The documentation didn't

This commit adds an option, "no-constraint", that defaults to "false" and can be provided as true/false, yes/no, 1/0 or can be simply provided as --no-constraint. When this flag is true the DummyConstraint line is removed from the output task file.

The constraint default value of 'weekdays' was left in place for backward compatibility.

For example:

Default behavior:
crunz make:task -r ls -f daily mytask
Screen Shot 2020-03-23 at 3 41 32 PM

Providing anything ("none") for constraint:
crunz make:task -r ls -f daily -c none mytask
Screen Shot 2020-03-23 at 3 42 24 PM

After this commit, --no-constraint:
crunz make:task -r ls -f daily --no-constraint mytask
Screen Shot 2020-03-23 at 3 41 23 PM

The tests for the task generator don't check the contents of the file, so I didn't add tests for this specific case.

@PabloKowalczyk
Copy link
Collaborator

Please migrate to new repo #411
Thanks @frontiersnorth-user!

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.

2 participants