How to Create a Scheduled Event-Based Job
This guide assumes that you have already installed Resoto.
Define the action you would like to automate. For example, let's say we want to clean up development accounts at the end of each week:
> search is(instance) in ["dev", "playground"] | cleantip
See Search How-To Guides for guidance on how to write search queries.
0 22 * * FRI
Now that we've defined the action and decided on the trigger, create the job using the
jobs addcommand (replace the value of the
--idparameter with a unique job identifier):
> jobs add --id weekly_dev_cleanup --schedule "0 22 * * FRI" --wait-for-event cleanup_plan 'search ... | clean'