# Working with scheduled tasks

The agent SDK includes the powerful Quartz scheduler and tools as part of the Common Tools to work with the scheduler.  In addition, the base coordinator prompts also know how to handle parsing out a request for something that should be scheduled vs regular task execution.

The scheduler is also pre-configured to store triggers and jobs in your agent database, giving you maximum flexibility to run recurring tasks even across restarts of your agents. &#x20;

### Scheduled task prompts

Here are a few examples that an HR team might use to leverage your agent functionality on a recurring basis.

> Every day/week/month send the workiversaries to #general
>
> On the last day of every month, send me an email reminder to set up the new pulse engagement survey
>
> Every six months send me a Slack reminder to update our employee handbook

If you're using the slack integration, the output might look something like the following:

<figure><img src="/files/loeklSvstksMED2Z0oKE" alt=""><figcaption></figcaption></figure>

### Built-in tools for working with tasks

Because scheduling a new task is handled natively, there are no tools for doing that operation.  Instead, we provide tools for listing your scheduled jobs and those in your organiation (if you have appropriate permissions) and clearing a job from the queue.

<table><thead><tr><th width="409.48828125">Tool name</th><th>Description</th></tr></thead><tbody><tr><td>listMyScheduledTasksOrOrgsTasks</td><td>Lists the user's active or scheduled workflows (including tasks, jobs, etc). The user can also request to list all the organizations tasks but only if they have the proper permission (meaning they are an admin). You should only use the tool output - do not mention random or hallucinated tasks.</td></tr><tr><td>unscheduleOrRemoveOrDeleteTaskOrJob</td><td>Unschedule or remove or delete a previously scheduled task or job - including removing or deleting all of the users tasks or the organization's tasks. You must always explicitly confirm that the user wants to unschedule or remove the provided job id or all tasks if requested - never skip this. You should explicitly ONLY clear all the org tasks if the user specifically mentions clearing ALL the organizations tasks and has the proper permission. clearAllOrgTasks cannot be true if clearAllMyTasks is true. The Job id is always required and the user can only delete their own jobs unless they are an admin. The job id should explicitly never be modified from what the user sends to you."</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.peoplelogic.dev/guides/getting-started-with-the-talent-agent-sdk/working-with-scheduled-tasks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
