【问题标题】:How add to crontab sphinx index?如何添加到 crontab sphinx 索引?
【发布时间】:2015-02-03 02:16:49
【问题描述】:

我在 crontab 文件中添加了一行:

*/5 * * * * indexer --config /etc/sphinx/sphinx.conf --all --rotate

但它不起作用!

我试过了:

$crontab -l
0 * * * * /etc/sphinx/indexer.sh
*/5 * * * * /etc/sphinx/searchd.sh

indexer.sh

#!/bin/sh

/usr/bin/indexer --config /etc/sphinx/sphinx.conf --all --rotate > /dev/null

searchd.sh

#!/bin/sh

runing=`ps ax | grep "searchd" | grep -v "grep" | wc -l`

if [ $runing -eq 0 ]; then
    /usr/bin/searchd --config /etc/sphinx/sphinx.conf
fi

【问题讨论】:

    标签: cron centos crontab server


    【解决方案1】:

    如果我可以发表评论,这将是评论......

    根据您提供的信息,很难猜测出了什么问题。我的第一个猜测是权限问题。你跑了吗

    crontab -e
    

    是否有足够权限运行索引器脚本的用户?手动触发时脚本会运行吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-18
      • 1970-01-01
      • 2012-05-09
      • 1970-01-01
      • 2015-01-04
      • 1970-01-01
      • 2015-12-29
      • 1970-01-01
      相关资源
      最近更新 更多