Hi ,

Not sure whether someone has already asked this but really felt the need to understand how to configure the redis cache to flush all (flushall command) to run at particular time. It is currently configured to run at 1:00 AM daily but not sure where is the command running from. If any one can help on this ?

Thanks

Comment From: itamarhaber

Redis has no built-in periodic flushing - the command is most probably sent to it from a cronned script.

Comment From: mkcgphy

Can you please provide me an example of that. I need to find that out.

Comment From: jonahharris

@mkcgphy kick off a Redis client and execute the MONITOR command around 1 AM -- watch for the command and you'll get the IP of where it came from. That should help narrow it down. As @itamarhaber said, it's probably in a crontab somewhere. Once you have the server, it should hopefully be easy to find.

$ echo 'monitor' | ./redis-cli | grep -i flushall
1521180061.396326 [0 127.0.0.1:53793] "flushall"

Suggest to close as non-redis issue @antirez

Comment From: mkcgphy

Thanks for information @jonahharris . Could you please help me what I need to put in command. I am quite newbie to Redis. Appreciate your help on this. I am using Redis Client that is available

Thanks

Comment From: jonahharris

You on Windows or Linux/UNIX?

Comment From: mkcgphy

Windows

Comment From: WiFeng

It is currently configured to run at 1:00 AM daily but not sure where is the command running from

Why do you think that it was running at 1:00 AM? The time is very exact ? If it is so, it seem to be easy to find. As @itamarhaber & @jonahharris said ,you can execute the MONITOR command around 1 AM.

[liuweifeng@vm-10-112 redis]$ echo "MONITOR" | ./bin/redis-cli > ~/monitor.log &
[liuweifeng@vm-10-112 redis]$ less ~/monitor.log    

After the command execute 5 minutes, you can scan the file contents named monitor.log by the grep tools or others that you love. It contains all the executed commands in the redis server. Perhaps you can find some useful clues.

On the Window system, I suggest you install the GIT Bash tool. It is easy to execute above commands.