【发布时间】:2015-06-27 03:40:58
【问题描述】:
如果 gem elasticsearch 没有在我的 Rails 应用程序中运行,我想启动它。我不想使用任何其他宝石来做到这一点。 所以我创建了文件 start.sh:
if pgrep -u sth java; then
/home/sth/sth/attractions/elasticsearch-1.6.0/bin/elasticsearch
fi
我把它放在了 crontab 中:
* * * * * /home/sth/sth/attractions/start.sh
脚本不工作,我不知道为什么。
【问题讨论】:
标签: ruby-on-rails elasticsearch cron crontab