I am trying to understand a bit clearer what you are looking for/your concern… Do you have specific concerns regarding data integrity? If you don’t mind sharing, what kind of task are you doing that’s specific to only one server?
To try to add a bit of clarity regarding replication, the KEYDB.CRON functionality in this regards is similar to that of EXPIRE. If you are running regular master/replica set up, only the master node runs the Cron command. If you are running active replication, then both nodes will run the Cron command. Data however should not have issues (ie. will not increment a counter twice)
Are you looking to do something like this?
local info_server = redis.call('INFO', 'SERVER')
local tcp_port = (info_server:match("tcp_port:([^/]%d+)"))
if tcp_port == "7000" then
Or a different functionality? (as an FYI we are looking at an issue with KEYDB.CRON probing INFO as it seems to have an issue currently)