【发布时间】: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