> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# scheduled_task table

> A scheduled entry executing a script at certain times

## scheduled\_task Table (376)

A scheduled entry executing a script at certain times

## Fields

| Name         | Description                                         | Type                          | Nullable |
| ------------ | --------------------------------------------------- | ----------------------------- | :------: |
| id           | Primary key                                         | PK                            |    No    |
| script\_id   | The id of the script to execute.                    | FK [ejscript](./ejscript.mdx) |    Yes   |
| schedule\_id | Update schedule                                     | FK [schedule](./schedule.mdx) |    Yes   |
| description  | Optional description of what this task is used for. | String(2047)                  |    Yes   |

<img src="https://mintcdn.com/superofficeas/8-OIGQQJR0VGDXy_/media/loc/en/database/tables/scheduled_task.png?fit=max&auto=format&n=8-OIGQQJR0VGDXy_&q=85&s=5e0c583f1e3c0333f6bd38b11df4b505" alt="scheduled_task table relationship diagram" width="635" height="59" data-path="media/loc/en/database/tables/scheduled_task.png" />

## Indexes

| Fields       | Types | Description |
| ------------ | ----- | ----------- |
| script\_id   | FK    | Index       |
| schedule\_id | FK    | Index       |

## Relationships

| Table                  | Description                                                                   |
| ---------------------- | ----------------------------------------------------------------------------- |
| [ejscript](./ejscript) | ejscript                                                                      |
| [schedule](./schedule) | Generic scheduled tasked handling time scheduling, locking and error messages |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [Trigger](/en/automation/trigger/reference/CRMScript.Event.Trigger.md)
- [Scheduled tasks](/en/customization/macros-and-scripts/admin/schedule-task.md)
- [CRMScript best practices](/en/automation/crmscript/code-quality/best-practices.md)
- [CrmSetup and CrmTask utilities](/en/onsite/install/database/crmsetup-and-crmtask.md)
- [Task table](/en/database/tables/task.md)
- [TaskMenu table](/en/database/tables/taskmenu.md)
