Skip to main content
Version: 3.2.6

How to Create a Scheduled Job

Jobs allow you to define automations in Resoto and can be triggered on a regular schedule.

Prerequisites

This guide assumes that you have already installed Resoto.

Directions

  1. Define the action you would like to automate. For example, let's say we want to send Discord alerts listing deprecated RDS instances:

    > search is(aws_rds_instance) and db_type=aurora-postgresql and db_version~11 | discord title="Outdated Aurora databases found." message="This version is outdated and should be migrated!"
    tip

    See Search How-To Guides for guidance on how to write search queries.

  2. Determine the job schedule and define it using a cron expression. For example, if we want to run the job every Monday at 9am:

    0 9 * * 1
  3. Now that we've defined the action and decided on the schedule, create the job using the jobs add command (replace the value of the --id parameter with a unique job identifier):

    > jobs add --id outdated_aurora --schedule "0 9 * * 1" 'search is(aws_rds_instance) and db_type=aurora-postgresql and db_version~11 | discord title="Outdated Aurora databases found." message="This version is outdated and should be migrated!"'

Further Reading