Run /

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.

Configure CI/CD for a job

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.

Set the cron schedule and concurrency policy

For scheduled cron jobs you must set a schedule and concurrency policy to dictate when the job will run.

Job schedule

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: @yearly, @annually, @monthly, @weekly, @daily or @hourly.

Concurrency policy

Choose whether to allow this job to run while another instance of the job is running, or to replace the currently running instance.

  • Allow will enable multiple instances of this job to run.
  • Forbid will keep the current instance of the job running and stop a new instance from being run.
  • Replace will 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.

Set the retry and time limit

Retry limit

You can specify the maximum number of attempts to run a job before it is marked as failed.

Time limit

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.

© 2022 Northflank Ltd. All rights reserved.