Just spent a good 30 minutes to an hour debugging an issue around why Sphinx indexing was running fine via the command-line, but not via cron.
Turns out I’d seen this issue before. Oftentimes scripts running via cron have different paths setup for whatever reason.
So if you are trying to run the command ‘indexer’ it might fail in cron, even though it runs fine in your normal login environment. (full path is: /usr/local/bin/indexer on my system)
Specifying the full path manually did the trick, i.e.:
0-59/15 * * * * /usr/local/bin/indexer --all --rotate --config /foo/current/config/sphinx.conf







