Run an image once or on a schedule
You can run code from a Git registry or an image from a container registry as a job that will terminate after the container has finished running. You can create either a manual job, to run once whenever you trigger it, or a cron job to run on a schedule.
Create a new job and select either a cron or manual job (if you have selected a cron job, set the schedule and concurrency policy), configure the retry and time limits, and choose the source that contains the code or image you want to run.
From the job overview you can run manual jobs, or pause and resume scheduled jobs.
If continuous integration (CI) is active every new commit to the linked repository will automatically result in a new build. If continuous delivery (CD) is active new job runs will automatically use the latest available build.
Scheduled jobs can be toggled between inactive and active. If inactive the job will still build the latest commits (if CI is enabled), however it will not run the build.
Pausing a job will disable CI/CD and, for scheduled jobs, stop it from running on a schedule.
For scheduled cron jobs you must set a schedule and concurrency policy to dictate when the job will run.
The job schedule is a cron expression. It consists of five fields representing the time at which to execute a specified command.
* * * * * | | | | | | | | | |___ day of week (0-6) (Sunday is 0) | | | |_____ month (1-12) | | |_______ day of month (1-31) | |_________ hour (0-23) |___________ minute (0-59)
For simple cron expressions you have option to use the following variables:
Choose whether to allow this job to run while another instance of the job is running, or to replace the currently running instance.
Allowwill enable multiple instances of this job to run.
Forbidwill keep the current instance of the job running and stop a new instance from being run.
Replacewill terminate any currently running instance of the job and start a new one.
The concurrency policy does not apply when initiating a job run manually.
You can specify the maximum number of attempts to run a job before it is marked as failed.
You can specify (in seconds) the maximum amount of time for a job to run, whether it has failed or not. This will take precedence over the Retry Limit.
For example, if you set a Retry Limit of 6 and a Time Limit of 480, the job will terminate after 8 minutes regardless of how many times it attempted to run.
Scale your services
Increase the resources available to your services, and the number of instances to deploy.
Configure health checks
Monitor the uptime and success of your deployed services and builds to ensure your code runs correctly and is always available.
View logs and metrics
View detailed, real-time logs and metrics from builds, deployments, and more.
Set build arguments and inject runtime variables into running deployments.