Estimated Reading Time: 1 minutes|Last Updated: 11/3/2021, 10:50:40 AM

# Create Lua-extension

# usage

Usage: oredge lua-extension create [OPTIONS]

OPTIONS:
    --name string                      name.
    --code string                      code.
    --trigger-type string              cron(default) or event.
    --interval integer                 30(default).
    --event-type string                node_offline, node_online, release.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

# example

  1. create lua extension with trigger type event.
# oredge lua-extension create --name test --code "a=1" --event-type node_offline --trigger-type event 
ID: 1
  1. create lua extension with trigger type corn.
# oredge lua-extension create --name test --code "a=1" --interval 30
ID: 1