---
name: "createLightRhythmsRefreshTimer"
mode: "kit"
versionRequirements:
  - { name: "MiniKit", version: "3.7.6" }
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## createLightRhythmsRefreshTimer

> [VERSION] MiniKit >= 3.7.6 | @tuya-miniapp/cloud-api >= 1.0.5

> 💡 该接口为云能力，需开通授权后使用，关于云能力可[查看文档](/cn/miniapp/common/desc/tech-stack/api) 目前云能力在 开发者工具环境无法使用，需要打包后或真机调试使用。

### 描述

创建定时刷新生物节律时间的任务

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `data` | `PostLightRhythmsRefreshTimerParams` | 是 | - | 请求参数：bizId（业务 ID）、bizType（业务类型）、cron（可选，cron 表达式） |

### 引用对象

##### `interface` PostLightRhythmsRefreshTimerParams

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `bizId` | `string` | 业务 ID：设备 ID 或群组 ID |
| `bizType` | `0 \| 1` | 业务类型：`0` 设备，`1` 群组 |
| `cron` | `string` | 定时任务 cron 表达式；不传则使用服务端默认。间隔须在 1～30 天之间。 |


### 示例代码

#### 请求示例

```typescript
import { createLightRhythmsRefreshTimer } from '@tuya-miniapp/cloud-api';

createLightRhythmsRefreshTimer({
  bizId: 'vdevo167504******003',
  bizType: 0,
  cron: '0 0 0 * * ?',
})
  .then((response) => {
    console.log(response);
  })
  .catch();
```

#### 返回示例

```json
1
```
