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 format in documentation is wrong #8180

Open
spyderbr6 opened this issue Dec 29, 2024 · 1 comment · May be fixed by #8181
Open

Scheduler format in documentation is wrong #8180

spyderbr6 opened this issue Dec 29, 2024 · 1 comment · May be fixed by #8181

Comments

@spyderbr6
Copy link

Environment information

System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
  Memory: 4.89 GB / 15.93 GB
Binaries:
  Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
  Yarn: undefined - undefined
  npm: 10.9.1 - C:\Program Files\nodejs\npm.CMD
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.5.1
  @aws-amplify/backend: 1.11.0
  @aws-amplify/backend-auth: 1.4.2
  @aws-amplify/backend-cli: 1.4.5
  @aws-amplify/backend-data: 1.3.0
  @aws-amplify/backend-deployer: 1.1.12
  @aws-amplify/backend-function: 1.10.0
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.4
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.4
  @aws-amplify/cli-core: 1.2.1
  @aws-amplify/client-config: 1.5.4
  @aws-amplify/deployed-backend-client: 1.5.0
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.11
  @aws-amplify/platform-core: 1.4.0
  @aws-amplify/plugin-types: 1.6.0
  @aws-amplify/sandbox: 1.2.8
  @aws-amplify/schema-generator: 1.2.6
  aws-amplify: 6.11.0
  aws-cdk: 2.173.2
  aws-cdk-lib: 2.173.2
  typescript: 5.7.2
No AWS environment variables
No CDK environment variables

Describe the bug

// Runs at midnight UTC daily
"0 5 * * ? *" // 5:00 AM UTC

while documentation on https://docs.amplify.aws/react/build-a-backend/functions/scheduling-functions/ says to do // every tuesday at 5pm
"0 17 * ? 3 *", the 3 and ? are transposed and aws fails with error: Failed to instantiate schedule for nodejs function
Caused By: Cron field for month must be a whole number between 1 and 12\r\nCron expressions cannot have both day-of-month and day-of-week defined, you must use a ? in one of the fields
Resolution: See the underlying error message for more details.

fix documentation please.

Reproduction steps

attempt to build any function with the cron sending the provided command being improperly formatted.

@ykethan
Copy link
Member

ykethan commented Dec 30, 2024

Hey @spyderbr6, thank you for reporting this. The cron expression should be 0 17 ? * 3 * for a run on every tuesday at 5pm.
Transferring this to the documentation repository to update the documentation.

@ykethan ykethan transferred this issue from aws-amplify/amplify-backend Dec 30, 2024
@ykethan ykethan linked a pull request Dec 30, 2024 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants