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

# Reference

> Reference overview

## Task Methods

| Method         | Parameters                               | Description                |
| -------------- | ---------------------------------------- | -------------------------- |
| `createTask`   | `name: string`<br />`config: TaskConfig` | Creates a new task         |
| `scheduleTask` | `taskId: string`<br />`schedule: string` | Schedules an existing task |

## Types

```typescript theme={null}
interface TaskConfig {
  // Task configuration options
  retries?: number;
  timeout?: number;
  schedule?: string;
}

interface Task {
  id: string;
  status: 'pending' | 'running' | 'completed';
  // ... other properties
}
```

## Steps

<Steps>
  ### createTask

  Creates a new task with the specified configuration

  **Parameters:**

  * `name: string` - Name of the task
  * `config: TaskConfig` - Task configuration

  **Returns:** `Task`

  ### scheduleTask

  Schedules a task for execution

  **Parameters:**

  * `taskId: string` - ID of the task to schedule
  * `schedule: string` - Cron expression or date
</Steps>
