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

scheduler-cli Timezone Error #514

Closed
6 tasks
dubrowin opened this issue Feb 6, 2024 · 3 comments
Closed
6 tasks

scheduler-cli Timezone Error #514

dubrowin opened this issue Feb 6, 2024 · 3 comments
Labels

Comments

@dubrowin
Copy link

dubrowin commented Feb 6, 2024

Describe the bug

When I try to create a schedule or update a schedule with a timezone, I receive an error

To Reproduce

I installed the schedule-cli on CloudShell and ran the below:

scheduler-cli update-schedule --stack shlomod-instance-scheduler --name my-office-hours-schedule -–timezone 'Asia/Jerusalem'
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: unrecognized arguments: -–timezone Asia/Jerusalem

according to the documentation, this should be a supported timezone.

https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/schedules.html

Expected behavior

The scheduler-cli should accept the timezone and configure it in the DynamoDB table correctly.

Please complete the following information about the solution:

  • Version: [e.g. v1.0.0]

'scheduler-cli 1.5.3'

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example,
"(SO0030) instance-scheduler-on-aws v1.5.1". You can also find the version from
releases

  • Region: [e.g. us-east-1] - us-east-1
  • Was the solution modified from the version published on this repository? - no
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your service quotas for
    the sevices this solution uses? - not applicable
  • Were there any errors in the CloudWatch Logs? - not applicable
    Troubleshooting

Additional context
Add any other context about the problem here.

@dubrowin dubrowin added the bug label Feb 6, 2024
@CrypticCabub
Copy link
Member

hi @dubrowin

The error you describe indicates a malformed input to the cli rather than there being a problem with the timezone you provided. I copy-pasted the command you provided exactly as-is, and it looks like the second dash in --timezone is not actually a hyphen but some other character, so the cli is failing to parse it. When I correct this, the cli accepts your command without problem (though it does complain that you must provide some periods for your schedule as the update command is a full replacement, not just updating a single value)

@dubrowin
Copy link
Author

dubrowin commented Feb 7, 2024

Thank you Caleb for the explanation. That faulty dash (-) was taken directly from the AWS Documentation

https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/sample-schedule.html

@CrypticCabub
Copy link
Member

Thanks @dubrowin! We'll get that fixed in the doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants