收藏
回答

怎样设置定时触发器一个半小时触发一次?

我需要设置定时触发器一个半小时触发一次,Cron 语法是写成2行,在云函数中怎么实现?

0 0,3,6,9,12,15,18,21 * * * <commands>
30 1,4,7,10,13,16,19,22 * * * <commands>


谢谢


最后一次编辑于  2019-12-04
回答关注问题邀请回答
收藏

2 个回答

  • Michael
    Michael
    2023-06-25

    "triggers": [

            {

                "name": "taskGetTokenTrig1",

                "type": "timer",

                "config": "0 0 0/3 * * * *"

            },

            {

                "name": "taskGetTokenTrig2",

                "type": "timer",

                "config": "0 30 1/3 * * * *"

            }

        ]


    2023-06-25
    有用 1
    回复
  • _人世间
    _人世间
    2019-12-04

    https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/functions/triggers.html

    2019-12-04
    有用
    回复 2
    • Z
      Z
      2019-12-04
      你确定“一个半小时“触发一次的答案在这个里?
      2019-12-04
      回复
    • 明天以后
      明天以后
      2022-03-14
      误人子弟
      2022-03-14
      回复
登录 后发表内容
问题标签