boostercloud / booster

Booster Framework
https://www.boosterframework.com
Apache License 2.0
412 stars 85 forks source link

Scheduled Command cron param #625

Open fecony opened 3 years ago

fecony commented 3 years ago

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:

@ScheduledCommand({
  hour: '0',
  minute: '5',
  month: '8',
})
export class SomeCommandName {
...
Checklist - [X] ``packages/cli/src/commands/new.ts`` ✅ Commit ad8a9fa - [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
NickSeagull commented 3 years ago

Thanks!

sweep-ai[bot] commented 10 months ago

Here's the PR! https://github.com/boostercloud/booster/pull/1472.

⚡ Sweep Basic Tier: I'm creating this ticket using GPT-4. You have 4 GPT-4 tickets left for the month and 2 for the day. For more GPT-4 tickets, visit our payment portal.

Actions (click)


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/boostercloud/booster/blob/4e5a10307f9528e3bceb6d7cf6917544417c7e34/packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts#L1-L57

Step 2: ⌨️ Coding

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

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

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


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/cron-schedule-expressions.

.


🎉 Latest improvements to Sweep:


💡 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