[{"data":1,"prerenderedAt":34},["ShallowReactive",2],{"snippet-eventbridge-flexible-schedule":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":17,"meta":19,"resources":20,"services":21,"snippets":24,"stem":31,"tags":32,"type":18,"__hash__":33},"snippets\u002Fsnippets\u002Feventbridge-flexible-schedule.json","Create EventBridge Scheduler Schedules with Flexible Time Window Using AWS CLI",[7],"content\u002Fcontributors\u002Farchana-v.json","Use AWS CLI to create Amazon EventBridge Scheduler schedules with rate and cron expressions along with flexible time windows, targeting AWS Lambda","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Feventbridge-flexible-schedule",{"headline":14,"text":15},"How it works",[16],"This snippet demonstrates how to create Amazon EventBridge Scheduler schedules using the AWS CLI `aws scheduler create-schedule` command with rate and cron expressions along with flexible time windows, targeting AWS Lambda",[18],"AWS CLI",{},null,[22,23],"eventbridge-scheduler","lambda-event-functions",[25,28],{"title":26,"language":18,"code":27},"Cron flexible schedule","aws scheduler create-schedule \\\n  --name \"my-cron-schedule\" \\\n  --schedule-expression \"cron(0 9 * * ? *)\" \\\n  --target '{\n    \"Arn\": \"&#60;LAMBDA_ARN&#62;\",\n    \"RoleArn\": \"&#60;EVENTBRIDGE_ROLE_ARN&#62;\"\n  }' \\\n --flexible-time-window '{\n    \"Mode\": \"FLEXIBLE\",\n    \"MaximumWindowInMinutes\": 15\n  }'\n",{"title":29,"language":18,"code":30},"Rate flexible schedule","aws scheduler create-schedule \\\n  --name \"my-rate-schedule\" \\\n  --schedule-expression \"rate(5 minutes)\" \\\n  --target '{\n    \"Arn\": \"&#60;LAMBDA_ARN&#62;\",\n    \"RoleArn\": \"&#60;EVENTBRIDGE_ROLE_ARN&#62;\"\n  }' \\\n  --flexible-time-window '{\n    \"Mode\": \"FLEXIBLE\",\n    \"MaximumWindowInMinutes\": 15\n  }'\n","snippets\u002Feventbridge-flexible-schedule",[],"D0iQVi9hbz6YQxOFeu1rorXlwdCJ9keCMaB5Pn_ELPg",1792665262989]