Open fecony opened 3 years ago
Thanks!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
packages/cli/src/commands/new.ts
✅ Commit ad8a9fa
Create packages/cli/src/commands/new.ts with contents:
• Add a new argument to the `newScheduledCommand` function to accept the cron parameters. This argument should be an array of strings representing the cron parameters in the order minute, hour, day, month, weekDay, year.
• Modify the `newScheduledCommand` function to generate the `@ScheduledCommand` decorator with the cron parameters. The generated code should look like this: ```typescript @ScheduledCommand({ minute: '', hour: ' ', day: ' ', month: ' ', weekDay: ' ', year: ' ', }) export class { ... } ```
• Modify the `newScheduledCommand` command to pass the cron parameters to the `newScheduledCommand` function.
Sandbox logs for
ad8a9fa
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-17T18_35_21_546Z-debug-0.log
packages/framework-types/src/concepts/scheduled-command.ts
⚠️ No Changes Made
Modify packages/framework-types/src/concepts/scheduled-command.ts with contents:
• Modify the `ScheduleInterface` to include optional properties for minute, hour, day, month, weekDay, and year. These properties should be strings and should default to '*'.
Sandbox logs for
0ae3f68
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-17T18_39_10_466Z-debug-0.log
packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts
⚠️ No Changes Made
Modify packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts with contents:
• Modify the `createCronExpression` method to create the cron expression from the cron parameters in the `ScheduleInterface` object. The expression should be created as follows: ```typescript const expression = `${scheduledCommandMetadata.minute} ${scheduledCommandMetadata.hour} ${scheduledCommandMetadata.day} ${scheduledCommandMetadata.month} ${scheduledCommandMetadata.weekDay} ${scheduledCommandMetadata.year}` ```
Sandbox logs for
9bf9c65
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-17T18_42_27_191Z-debug-0.log
I have finished reviewing the code for completeness. I did not find errors for sweep/cron-schedule-expressions
.
.
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
Feature Request
Passing cron schedule expressions as param when creating Scheduled Command resource.
Description
It would be nice feature (?) to be able to pass cron schedule expressions as param when creating Scheduled Command resource. For example: By running
boost new:scheduled-command SomeCommandName 5 0 * 8 *
command It would generate Scheduled Command resource with parameters:Checklist
- [X] ``packages/cli/src/commands/new.ts`` ✅ Commitad8a9fa
- [X] ``packages/framework-types/src/concepts/scheduled-command.ts`` ⚠️ No Changes Made - [X] ``packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts`` ⚠️ No Changes Made