redis - Crontab Process Not Executing Properly -
when run following command command line works fine:
/usr/local/bin/redis-cli keys "users_*" | xargs redis-cli del > /home/email/logs/deletelog.log 2>&1 however if run via cron root user doesn't seem execute correctly. expect there permissions issue somewhere. how can check out or fix issue?
i run following in crontab -e
45 23 * * * /usr/local/bin/redis-cli keys "users_*" | xargs redis-cli del > /home/email/logs/deletelog.log 2>&1 if output error log file getting following:
xargs: redis-cli: no such file or directory but can run command line using:
/usr/local/bin/redis-cli keys "users_*" | xargs redis-cli del > /home/email/logs/deletelog.log 2>&1 any ideas?
i found bug, missing /usr/local/bin/ in pipe. correct command should be:
/usr/local/bin/redis-cli keys "users_*" | xargs /usr/local/bin/redis-cli del > /home/email/logs/deletelog.log 2>&1
Comments
Post a Comment