Webhook rule launches action at specific time

76 views
Skip to first unread message

emery...@gmail.com

unread,
Mar 6, 2017, 3:40:05 PM3/6/17
to StackStorm
Is there a good method to launch actions/action chains at a specific time defined by input to a webhook rule?

I would like to setup a webhook rule, so that when it is matched, it will initiate the action/action chain at a specific time that is an input of the webhook json.  I have a tool that will trigger stackstorm rules via a webhook. It will specify a time when it needs the action to execute. What is the best stackstorm method to do this? Is there a better way to do this rather than initiating a sleep inside the action or actionchain? Would a subsequent trigger type of core.st2.DateTimer work? Thank you for any advice.

---    name: "initiate action"    pack: "mypack"    description: "initiate an action at a specific time"    enabled: true    trigger:        type: "core.st2.webhook"        parameters:            url: "mypack/time_action"    criteria:        trigger.body.action_type:            type: "equals"            pattern: "action_1"    action:        ref: "mypack.time_action_chain"        parameters:            timetostart: "{{trigger.body.timetostart}}"
            param1: "{{trigger.body.param1}}"
            param2: "{{trigger.body.param2}}"
            

hag...@gmail.com

unread,
Mar 15, 2017, 5:25:22 PM3/15/17
to StackStorm, emery...@gmail.com
I think you should read about the criteria for triggering.
Reply all
Reply to author
Forward
0 new messages