createLightRhythmsRefreshTimer(data: PostLightRhythmsRefreshTimerParams)

Requires:
MiniKit≥3.7.6@tuya-miniapp/cloud-api≥1.0.5

Description

Create a scheduled task to refresh circadian rhythm times

Parameters

ParameterTypeRequiredDescription
YesRequest parameters: bizId (business ID), bizType (business type), cron (optional, cron expression).

Return Value

Type: Promise<boolean>
boolean

Valid Values

PostLightRhythmsRefreshTimerParams.bizType
ValueDescriptionMiniKit Since
0--
1--

Examples

Request example

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

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

Response example

1

FAQ

Why does the biological rhythm cloud capability call fail?

Biological rhythm must have advanced capabilities enabled on the Tuya Developer Platform product feature definition page. Otherwise cloud capability calls will fail.

Failing to create a cloud task that refreshes biological rhythm times (sunrise/sunset/noon, etc.) on a cron schedule

When using a cron expression to create a cloud task that periodically refreshes biological rhythm times (sunrise/sunset/noon, etc.), you must save biological rhythm information in the device properties before calling this API. Otherwise the call will fail.