Install
openclaw skills install @huaweiclouddev/huawei-cloud-functiongraph-trigger-createCreate and configure scheduled TIMER triggers for Huawei Cloud FunctionGraph functions using Quartz Cron expressions. Use this skill when users ask to create triggers, schedule function execution, set up periodic tasks, or configure timers for functions. Triggered by keywords like "create trigger", "set up trigger", "schedule function", "periodic task", "timer", "cron", "创建云函数触发器", "配置云函数触发器", "云函数定时触发", "定时执行", "定时任务", "创建定时器", "FunctionGraph trigger", "schedule function execution".
openclaw skills install @huaweiclouddev/huawei-cloud-functiongraph-trigger-createThis skill enables the creation and configuration of scheduled triggers (TIMER type) for Huawei Cloud FunctionGraph functions. It supports Quartz Cron expression format for flexible scheduling configurations.
The trigger allows automatic execution of serverless functions at specified time intervals, making it ideal for:
Before using this skill, ensure the following requirements are met:
pip install huaweicloudsdkfunctiongraphHUAWEI_AK: Huawei Cloud Access KeyHUAWEI_SK: Huawei Cloud Secret KeyHUAWEI_REGION: Target region (e.g., cn-north-4)HUAWEI_PROJECT_ID: Project IDcd scripts
python create_trigger.py \
--function-urn "urn:fss:cn-north-4:project_id:function:default:my-function:latest" \
--name "daily-trigger" \
--schedule "0 0 2 * * ?" \
--schedule-type "Cron" \
--status "ACTIVE"
cd scripts
python create_trigger.py \
--function-urn "urn:fss:cn-north-4:project_id:function:default:my-function:latest" \
--name "daily-trigger" \
--schedule "0 0 8 * * ?" \
--schedule-type "Cron"
cd scripts
python create_trigger.py \
--function-urn "urn:fss:cn-north-4:project_id:function:default:my-function:latest" \
--name "every-5min" \
--schedule "5m" \
--schedule-type "Rate"
FunctionGraph uses Quartz Cron format with 6 or 7 fields:
┌───────────── second (0-59)
│ ┌───────────── minute (0-59)
│ │ ┌───────────── hour (0-23)
│ │ │ ┌───────────── day of month (1-31)
│ │ │ │ ┌───────────── month (1-12)
│ │ │ │ │ ┌───────────── day of week (1-7, 1=Sunday)
│ │ │ │ │ │
* * * * * ?
For detailed Cron expression reference including special characters and common examples, see Cron Expression Reference.
Before creating the trigger, confirm the following parameters:
| Parameter | Required | Description | Example |
|---|---|---|---|
function_urn | Yes | Target function URN | urn:fss:cn-north-4:xxx:function:default:my-func:latest |
trigger_name | Yes | Trigger name (1-64 chars) | daily-trigger |
schedule | Yes | Cron expression or Rate value | 0 0 2 * * ? or 5m |
schedule_type | No | Cron (default) or Rate | Cron |
enable_status | No | ACTIVE (default) or DISABLED | ACTIVE |
user_event | No | Additional user event data | optional info |
{
"status": "success",
"trigger_id": "timer-xxx-xxx-xxx",
"trigger_name": "daily-trigger",
"trigger_type": "TIMER",
"schedule": "0 0 2 * * ?",
"enable_status": "ACTIVE",
"message": "Trigger created successfully"
}
{
"status": "failed",
"error_code": "TriggerAlreadyExists",
"message": "Trigger with the same name already exists"
}
For complete error codes and troubleshooting information, see Cron Expression Reference.
After creating the trigger, verify the configuration:
Navigate to FunctionGraph console → Function details → Triggers tab to view all triggers
Navigate to FunctionGraph console → Function details → Triggers → View trigger details
Navigate to FunctionGraph console → Function details → Triggers → View execution history
Expected indicators:
? for unused day field: Either day-of-month or day-of-week should use ?daily-data-sync, hourly-health-check[frequency]-[purpose]For detailed information, refer to:
This skill is designed to work with Huawei Cloud FunctionGraph API. The tags field helps with skill discovery and categorization, while the version field follows semantic versioning for skill updates.
For troubleshooting and error codes, refer to Cron Expression Reference.
Related Skills:
huawei-cloud-functiongraph-function-createhuawei-cloud-functiongraph-deploy