# Snapshot, share, and schedule queries in Steampipe Cloud

> You could already schedule periodic snapshots of benchmarks and dashboards. Now you can do the same for queries!

By Steampipe Team
Published: 2023-03-08


In [How To Save and share Steampipe Cloud benchmarks and dashboards](https://steampipe.io/blog/using-steampipe-cloud-snapshots) we introduced [snapshots](https://steampipe.io/docs/cloud/dashboards#saving--sharing-snapshots): saved renderings of dashboards that you can view instantly, share privately with your team in Steampipe Cloud, and optionally share to anyone with a link. The [v0.17 release of Steampipe CLI](https://steampipe.io/blog/release-0-17-0) added the ability to save snapshots from the CLI, view them locally, and share them to cloud workspaces. Next we added the ability to [schedule](https://steampipe.io/docs/cloud/dashboards#scheduling-snapshots) snapshots so you can build a historical record of benchmark and dashboard runs, review changes over time, and track progress toward compliance. 

Now you can do the all these things with queries too! Here's an initial run of a query of AWS EC2 instances.

<div style={{"width":"70%", "marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="run a query" src="/images/blog/2023-03-scheduled-query/scheduled-query-initial-run.png" />
</div>

## Snapshot and share a query

To [take a snapshot](https://steampipe.io/docs/cloud/queries#saving-snapshots) of the query, click the *Snap* button at the top of the query screen after the results have fully loaded. (The button will be disabled until then.)

You'll land here.

<div style={{"width":"80%", "marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="run a query" src="/images/blog/2023-03-scheduled-query/scheduled-query-snap.png" />
</div>

Click the *Share* button to share it, just as you share a benchmark run or dashboard. If you're in a Steampipe Cloud [organization](https://steampipe.io/docs/cloud/organizations) you can share with members of your workspace, or use *Anyone with the link* to share globally. Otherwise you can still use *Anyone with the Link* to share from your personal workspace.

## Schedule a query snapshot

Alternatively you can [schedule](https://steampipe.io/docs/cloud/queries#scheduling-query-snapshots) a query snapshot. Starting from the same query pane, with results fully loaded as above, click *Schedule*. You'll land on the *Create scheduled snapshot* screen.

<div style={{"width":"50%", "marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="schedule the query" src="/images/blog/2023-03-scheduled-query/scheduled-query-create-pipeline.png" />
</div>

All Steampipe Cloud accounts offer Weekly and Daily options. When using [organizations](https://steampipe.io/docs/cloud/organizations#organizations) you can also choose Hourly or Custom (using cron syntax). To notify your team with a summary of results, add a webhook URL for Slack or Microsoft Teams. As with any scheduled [pipeline](https://steampipe.io/docs/cloud/pipelines#viewing-and-editing-pipelines) you can optionally adjust visibility, assign tags, and set up notification to Slack or MS Teams.
Once you make your choices and click *Schedule* you'll land on the pipeline page. Click *Run now* to verify that your query runs and produces an initial snapshot. 

<div style={{"marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="schedule the query" src="/images/blog/2023-03-scheduled-query/scheduled-query-pipeline-created.png" />
</div>

That's it! Now this query will run every day, and you'll accumulate snapshots that document your EC2 instances over time. Try scheduling some of your own queries, and [let us know](https://steampipe.io/community/join) how it goes!

