Files
jd_scripts/serverless.yml
2020-11-18 20:29:18 +08:00

34 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# serverless.yml
#组件信息
component: scf # (必选) 组件名称在该实例中为scf
name: jdscript # (必选) 组件实例名称。
#组件参数配置
inputs:
name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app}
enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可
src: ./
handler: index.main_handler #入口
runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15
region: ap-hongkong # 函数所在区域
description: This is a function in ${app} application.
memorySize: 128 # 内存大小单位MB
timeout: 900 # 超时时间,单位秒
events: # 触发器
- timer: # 定时触发器
parameters:
name: jd_bean_sign # 触发器名称
cronExpression: "0 0 0 */1 * * *" # 每天零点执行一次
enable: true
argument: jd_bean_sign # 额外的参数
- timer: # 定时触发器
parameters:
name: jd_blueCoin
cronExpression: "0 0 0 */1 * * *" # 每天零点执行一次
enable: true
argument: jd_blueCoin jd_club_lottery,JD2&JD3|JD4 # 额外的参数
environment: # 环境变量
variables: # 环境变量对象
AAA: BBB # 不要删除,用来格式化对齐追加的变量的