Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- JSON Get
- JSON Set
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Eval
AI-generatedSummary
Execute a Lua script on the Redis server with optional keys and arguments, returning the script's result.
Inputs
- Script (required) — Lua script to execute on the Redis server.
- Keys — Space-separated list of keys to pass to the script.
- Arguments — Space-separated list of arguments to pass to the script.
Output shape
a single JSON object containing the script execution result under the 'result' key.
The output contains the direct result of the Lua script invocation. If the result is a bigint, it is converted to a Number. Errors during execution are handled based on the node's 'Continue on Fail' setting, and will appear as error messages in the output if enabled.
Examples
Example 1: Run a Lua script without keys or arguments to get the current server time.
Set 'Script' to a Lua snippet that returns redis.call('TIME'). Leave 'Keys' and 'Arguments' empty.
Example 2: Run a Lua script with keys and arguments.
Provide space-separated keys in 'Keys' and arguments in 'Arguments'. The script can access them as KEYS and ARGV arrays respectively.