K
K
Kerm2019-09-02 12:16:34
linux
Kerm, 2019-09-02 12:16:34

No effect from running cron task, sphinx indexing?

in crontab:

0 */4 * * * root /usr/local/sphinx/bin/indexer --rotate --all --config /usr/local/sphinx/etc/sphinx.conf

Those. re-index Sphinx every 4 hours
In cron logs:
Sep  2 08:00:01 user CROND[19093]: (root) CMD (root /usr/local/sphinx/bin/indexer --rotate --all --config /usr/local/sphinx/etc/sphinx.conf)

But, new positions are not added to the search if manually executed in the console
/usr/local/sphinx/bin/indexer --rotate --all --config /usr/local/sphinx/etc/sphinx.conf, то все работает.

What did I do wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Adamos, 2019-09-02
@Adamos

Errors that occur during the execution of cron tasks are not written to the cron log, but to the mail of the system administrator - by default. Look in the /var/mail folder if mail is not configured.

K
kolyank, 2019-09-02
@kolyank

you need to make sure that the user for whom the schedule is created in cron has the necessary rights, including execution, for the script called from the schedule

P
Puma Thailand, 2019-09-02
@opium

View the result of the execution in the mail
Or redirect the output of the command to a file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question