> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/2.21.0/user-guide/workspaces/workspace-scheduler.md).

# Workspace scheduler

Terrakube allows to schedule a job inside workspaces, this will allow to execute a specific [template](/2.21.0/user-guide/organizations/templates.md) in an specific time.

To create a workspace schedule click the "schedule" tab and click "Add schedule" like the following image.

<figure><img src="https://3421131615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx1Ja1Osjf4KfhcMlJJom%2Fuploads%2Fgit-blob-c83397a6ed7caa9abc2c1d5c82439d7c6cd1c5fc%2Fimage%20(170).png?alt=media" alt=""><figcaption></figcaption></figure>

This is usefull for example when you want to destroy your infrastructure by the end of every week to save some money with your cloud provider and recreate it every monday morning.

Example.

Lets destroy the workspace every friday at 6 pm

{% hint style="info" %}
Cron expression will be 30 18 \* \* 5
{% endhint %}

<figure><img src="https://3421131615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx1Ja1Osjf4KfhcMlJJom%2Fuploads%2Fgit-blob-ea3a68e780f1f33c35169f42e278be104d6b8800%2Fimage%20(230).png?alt=media" alt=""><figcaption></figcaption></figure>

Lets create the workspace every monday at 5:30 am

{% hint style="info" %}
Cron expression will be 30 5 \* \* 1
{% endhint %}

<figure><img src="https://3421131615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx1Ja1Osjf4KfhcMlJJom%2Fuploads%2Fgit-blob-3700a0af587b9c0bb7467ac43db7e7f3a767281e%2Fimage%20(122).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terrakube.io/2.21.0/user-guide/workspaces/workspace-scheduler.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
