Domain statistics are not calculated if the 'cronie' and 'cronie-anacron' packages are installed

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:46:30 UTC

Modified:

2016-12-21 19:10:56 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Domain statistics are not calculated if the 'cronie' and 'cronie-anacron' packages are installed

Symptoms

Web statistics do not work - no statistics are shown for domains.

Information

By design, web statistics are calculated by the /etc/cron.daily/50plesk-webstat script on Apache service nodes on a daily basis. The script writes its results into the /usr/local/psa/var/log/web_statistic_executor.last.log file.

Check the file for possible errors. If it is not up to date, check which cron packages are installed on your server.

Cause

The issue may be caused by errors in the " cron " and " anacron " packages:

~# rpm -qa | grep cron  
cronie-1.4.4-7.el6.i686
cronie-anacron-1.4.4-7.el6.i686

And the " cron " was configured for hourly jobs:

~# ll /etc/cron.d/
totale 8
-rw-r--r-- 1 root root 113 19 lug 2011 0hourly
-rw-r--r-- 1 root root 459 18 giu 2012 sa-update

And the " anacron " for daily, weekly and monthly:

~# cat /etc/anacrontab | grep cron
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly

But the " anacron " service does not exist in system:

~# service crond status
crond (pid 635) in running...
~# service anacron status
anacron: unknown service

Resolution

Daily, weekly and monthly tasks should be run from the file /etc/cron.d/dailyjobs .

  1. Move the /etc/cron.hourly/0anacron file away:

    ~# mv /etc/cron.hourly/0anacron ./
  2. Create the file /etc/cron.d/dailyjobs with the following strings:

    SHELL=/bin/bash  
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO=root
    HOME=/
    02 4 * * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily
    22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.weekly
    42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.monthly
Have more questions? Submit a request
Please sign in to leave a comment.