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

Schedule DayOfWeek via terraform/API fails. #4959

Closed
moosilauke18 opened this issue Jun 14, 2019 · 0 comments

Comments

@moosilauke18
Copy link
Contributor

commented Jun 14, 2019

Describe the bug
When trying to use terraform to create a job schedule with cron of 0 0 0/2 ? * 1-5 * it comes back with error Crontab string format was invalid: 0 0 12 ? * ? * Notice how it changes the day of week from 1-5 to ?. The invalid format is actually added to job and can be seen on UI.

My Rundeck detail

To Reproduce
Go to https://github.com/terraform-providers/terraform-provider-rundeck/blob/master/rundeck/resource_job_test.go#L147 and change that schedule to be the above mentioned cron. Then run make testacc providing the mentioned ENV variables

Expected behavior
The cron should be set to run SUNDAY-THURSDAY, instead it gives invalid crontab information.

Additional context
If you try to enter 0 0 0/2 ? * 1-5 * into UI, it succeeds. If you try to enter the invalid 0 0 12 ? * ? * it shows invalid. However, running it on terraform successfully puts the invalid in the UI.

@ProTip ProTip self-assigned this Jun 15, 2019

moosilauke18 added a commit to moosilauke18/rundeck that referenced this issue Jun 17, 2019

@gschueler gschueler added the bug label Jun 18, 2019

@gschueler gschueler closed this in 0812775 Jul 10, 2019

gschueler added a commit that referenced this issue Jul 10, 2019

Merge pull request #4967 from moosilauke18/fix-schedule-dayofweek
Added test and extra if conditional to fix #4959

@gschueler gschueler added this to the 3.1.0-RC2 milestone Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.