Skip to content

Scheduler format in documentation is wrong #8180

@spyderbr6

Description

@spyderbr6

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions