Execute an HTTP-triggered worker.
Parameter | Command / Description |
|---|---|
Command name | worker execute |
Abbreviation | worker exec, worker e |
Command options: | |
| [Optional] Server ID configured using the config command. |
| [Default: 5000] The request timeout in milliseconds. |
| [Optional] The key of the project that the worker belongs to. |
Command arguments: | |
worker-key | The worker key. If not provided it will be read from the |
json-payload | The json payload expected by the worker. Use |
Execute an HTTP-Triggered Worker Example
Execute an HTTP-triggered worker initialized in the current directory, with a payload located in a file named payload.json from the same directory.
jf worker execute @payload.json
Execute an HTTP-triggered worker with a payload from the standard input.
jf worker execute - <<EOF
{
“a”: “key”,
“an-integer”: 14
}
EOFExecute an HTTP-triggered worker by providing the payload as an argument.
jf worker execute ‘{“my”:”payload”}’