Reputation: 1075
How can i run the following redis-cli command using a cron job?
redis-cli info clients
I wrote a simple bash script with this command, and setup a cron job to run every minute. But it does not seem like redis-cli commands are working with crontab.
Any suggestion how i can achieve this?
Upvotes: 0
Views: 3710
Reputation: 21
As posted by Mark Setchell in the comment
You are probably missing the full path to the command, maybe
/usr/local/bin/redis-cli
or some such. Presumably you want to send the output somewhere too... use> someFile.txt
at the and of the command.
referring to the full path of redis-cli worked for me.
Upvotes: 1