-
Notifications
You must be signed in to change notification settings - Fork 198
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 fails to compile when using cron: "* * * * *"
#2849
Comments
Oh, my knowledge on cron syntax is quite lacking but when I have to work with it I use https://crontab.guru. The website says So I guess there are different syntaxes 🤔 |
Reopening since I also just ran into this issue. I believe it's a bug since "?" is not a standard part of the unix cron format (not mentioned on the link shared by @skyrpex, and on the wikipedia page here it's listed as a non-standard character). One of the design tenets of our standard library is for APIs to be agnostic to the target cloud. If AWS has a unique format, the implementation for the AWS target can convert the cron string into a format that AWS supports. Nitric provides a nice example of how they handle this: https://nitric.io/docs/schedules#using-cron |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
keep
…On Tue, Aug 8, 2023 at 9:05 AM github-actions[bot] ***@***.***> wrote:
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this
issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant
information to be added.
Thanks!
—
Reply to this email directly, view it on GitHub
<#2849 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANFVK6MUCUCF5CECHKJB5TXUHJJTANCNFSM6AAAAAAY65TPII>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Some characters like `?` are configurations used by AWS, but to make the schedule more cloud-agnostic, I made some changes to bring it closer to the Unix implementation Now a cron like `* * * * *` will not throw an exception. Closes #2849 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.61.8. |
Reopening, since this was reverted in #5953 |
Related discussion on Slack: |
…5956) Some characters like `?` are configurations used by AWS, but to make the schedule more cloud-agnostic, I made some changes to bring it closer to the Unix implementation Now a cron like `* * * * *` will not throw an exception. I removed this test because it no longer made sense. ```wing try { new cloud.Schedule( cron: "* * * * *" ) as "s5"; } catch e { error = e; } assert(error == "cannot use * in both the Day-of-month and Day-of-week fields. If you use it in one, you must use ? in the other"); ``` Closes #2849 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.61.14. |
I tried this:
This happened:
I expected this:
It should compile and the scheduler should tick every minute.
Is there a workaround?
I don't know.
Component
Compiler, SDK
Wing Version
0.19.4
Wing Console Version
No response
Node.js Version
18.16.0
Platform(s)
MacOS
Anything else?
No response
Community Notes
The text was updated successfully, but these errors were encountered: