w3resource

Redis Scripting: SCRIPT KILL

Description

Redis SCRIPT KILL command is used to kill the currently executing Lua script, assuming no write operation was yet performed by the script. This command is mainly useful to kill a script that is running for too much time. If the script already performed write operations it can not be killed in this way because it would violate Lua script atomicity contract. In such a case only SHUTDOWN NOSAVE is able to kill the script, killing the Redis process in a hard way preventing it to persist with half-written information.

Syntax:

SCRIPT KILL 

Available since

2.6.0.

Return Value

Simple string reply

Return Value Type

String

Example:

redis 127.0.0.1:6379> SCRIPT KILL
OK

Previous: SCRIPT FLUSH
Next: SCRIPT LOAD



Follow us on Facebook and Twitter for latest update.