List of all available properties for a `'Scheduled Job'` manifest. To learn about Copilot jobs, see the [Jobs](../concepts/jobs.en.md) concept page. ???+ note "Sample scheduled job manifest" ```yaml name: report-generator type: Scheduled Job on: schedule: "@daily" cpu: 256 memory: 512 retries: 3 timeout: 1h image: build: ./Dockerfile variables: LOG_LEVEL: info env_file: log.env secrets: GITHUB_TOKEN: GITHUB_TOKEN # You can override any of the values defined above by environment. environments: prod: cpu: 2048 memory: 4096 ``` `name` String The name of your job.
`type` String The architecture type for your job. Currently, Copilot only supports the "Scheduled Job" type for tasks that are triggered either on a fixed schedule or periodically. `on` Map The configuration for the event that triggers your job. on.`schedule` String You can specify a rate to periodically trigger your job. Supported rates: | Rate | Identical to | In human-readable text and `UTC`, it runs ... | | ------------ | --------------------- | --------------------------------------------- | | `"@yearly"` | `"cron(0 * * * ? *)"` | at midnight on January 1st | | `"@monthly"` | `"cron(0 0 1 * ? *)"` | at midnight on the first day of the month | | `"@weekly"` | `"cron(0 0 ? * 1 *)"` | at midnight on Sunday | | `"@daily"` | `"cron(0 0 * * ? *)"` | at midnight | | `"@hourly"` | `"cron(0 * * * ? *)"` | at minute 0 | * `"@every {duration}"` (For example, "1m", "5m") * `"rate({duration})"` based on CloudWatch's [rate expressions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#RateExpressions) Alternatively, you can specify a cron schedule if you'd like to trigger the job at a specific time: * `"* * * * *"` based on the standard [cron format](https://en.wikipedia.org/wiki/Cron#Overview). * `"cron({fields})"` based on CloudWatch's [cron expressions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) with six fields. Finally, you can disable the job from triggering by setting the `schedule` field to `none`: ```yaml on: schedule: "none" ``` {% include 'image.md' %} {% include 'image-config.en.md' %} `entrypoint` String or Array of Strings Override the default entrypoint in the image. ```yaml # String version. entrypoint: "/bin/entrypoint --p1 --p2" # Alteratively, as an array of strings. entrypoint: ["/bin/entrypoint", "--p1", "--p2"] ``` `command` String or Array of Strings Override the default command in the image. ```yaml # String version. command: ps au # Alteratively, as an array of strings. command: ["ps", "au"] ``` `cpu` Integer Number of CPU units for the task. See the [Amazon ECS docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html) for valid CPU values. `memory` Integer Amount of memory in MiB used by the task. See the [Amazon ECS docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html) for valid memory values. `platform` String Operating system and architecture (formatted as `[os]/[arch]`) to pass with `docker build --platform`. For example, `linux/arm64` or `windows/x86_64`. The default is `linux/x86_64`. Override the generated string to build with a different valid `osfamily` or `architecture`. For example, Windows users might change the string ```yaml platform: windows/x86_64 ``` which defaults to `WINDOWS_SERVER_2019_CORE`, using a map: ```yaml platform: osfamily: windows_server_2019_full architecture: x86_64 ``` ```yaml platform: osfamily: windows_server_2019_core architecture: x86_64 ``` ```yaml platform: osfamily: windows_server_2022_core architecture: x86_64 ``` ```yaml platform: osfamily: windows_server_2022_full architecture: x86_64 ``` `retries` Integer The number of times to retry the job before failing. `timeout` Duration How long the job should run before it aborts and fails. You can use the units: `h`, `m`, or `s`. `network` Map The `network` section contains parameters for connecting to AWS resources in a VPC. network.`vpc` Map Subnets and security groups attached to your tasks. network.vpc.`placement` String Must be one of `'public'` or `'private'`. Defaults to launching your tasks in public subnets. !!! info If you launch tasks in `'private'` subnets and use a Copilot-generated VPC, Copilot will automatically add NAT Gateways to your environment for internet connectivity. (See [pricing](https://aws.amazon.com/vpc/pricing/).) Alternatively, when running `copilot env init`, you can import an existing VPC with NAT Gateways, or one with VPC endpoints for isolated workloads. See our [custom environment resources](../developing/custom-environment-resources.en.md) page for more. network.vpc.`security_groups` Array of Strings Additional security group IDs associated with your tasks. Copilot always includes a security group so containers within your environment can communicate with each other. `variables` Map Key-value pairs that represent environment variables that will be passed to your job. Copilot will include a number of environment variables by default for you. `secrets` Map Key-value pairs that represent secret values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) that will be securely passed to your job as environment variables. `storage` Map The Storage section lets you specify external EFS volumes for your containers and sidecars to mount. This allows you to access persistent storage across regions for data processing or CMS workloads. For more detail, see the [storage](../developing/storage.en.md) page. storage.`volumes` Map Specify the name and configuration of any EFS volumes you would like to attach. The `volumes` field is specified as a map of the form: ```yaml volumes: