1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Manage and modify cron.daily start hour

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by SalvadorS, Sep 1, 2010.

  1. SalvadorS

    SalvadorS Regular Pleskian

    29
    90%
    Joined:
    Nov 12, 2009
    Messages:
    282
    Likes Received:
    2
    Hello,

    Now on my Plesk 9.3 servers the everyday awstats proccess ends at 11AM more or less. I want this proccess to ends sooner than that hour.

    I know awstats proccess is part of daily proccess execute in plesk every day. These process starts on 50plesk-daily cron which is executed everyday. I know that this command inside 50plesk-daily who manage the update of the daily stats (and more things):

    /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php

    So, If I delay the start of 50plesk-daily one hour for example, the stats must end one hour before (more or less)

    Checking where 50plesk-daily cron is I find this under /etc/crontab:

    So this cron runs /etc/cron.daily.

    Questions:

    1.- Is this cron running really /etc/cron.daily

    2.- I modify crontab for the line:

    From 6.25 to 5.25 but the stats ends at the same hour.

    What I am doing wrong?

    Where I can really modify the cron.daily to start earlier?

    Thanks
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
  3. SalvadorS

    SalvadorS Regular Pleskian

    29
    90%
    Joined:
    Nov 12, 2009
    Messages:
    282
    Likes Received:
    2
    Dear Igor, thanks for your quick reply.

    I check it in the two bigger transfer usage domains and we don´t have the issue:

     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    I have following default simple record in /etc/crontab for cron.daily

    46 5 * * * root run-parts /etc/cron.daily

    Are you sure that you have not modified /etc/crontab ?
     
  5. SalvadorS

    SalvadorS Regular Pleskian

    29
    90%
    Joined:
    Nov 12, 2009
    Messages:
    282
    Likes Received:
    2
    No I don´t.

    This is the crontab (/etc/crontab) for my 9.3 Plesk over Debian:

    And this is another crontab (/etc/crontab) from another server 9.5 plesk over debian:

    As you can see is the same content and I think there aren´t two differents crontabs (/etc/crontab). Also we have some VPS with the same crontab file.

    Can you post your /etc/crontab in order to know how your file is configured?
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    # cat /etc/crontab
    SHELL=/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO=root
    HOME=/

    # run-parts
    43 * * * * root run-parts /etc/cron.hourly
    46 5 * * * root run-parts /etc/cron.daily
    17 2 * * 0 root run-parts /etc/cron.weekly
    9 0 18 * * root run-parts /etc/cron.monthly
    */5 * * * * root (cd /usr/local/sitebuilder/utils && /opt/php52/bin/php5 tasksmng.php > /dev/null 2>&1)

    # rpm -qf /etc/crontab
    crontabs-1.10-8

    # cat /etc/redhat-release
    CentOS release 5.5 (Final)
     
  7. SalvadorS

    SalvadorS Regular Pleskian

    29
    90%
    Joined:
    Nov 12, 2009
    Messages:
    282
    Likes Received:
    2
    Hello,

    Your release is CentOS release 5.5 (Final), our releases are Debian and Ubuntu. Can we modify the crontab and put the line:

    Instead

    Without any trouble?
     
  8. SalvadorS

    SalvadorS Regular Pleskian

    29
    90%
    Joined:
    Nov 12, 2009
    Messages:
    282
    Likes Received:
    2
    Also helps if anybody with debian can post their /etc/crontab file and if somebody changed the start hour for the cron.daily

    Thanks
     
  9. Jeffry26

    Jeffry26 New Pleskian

    22
    57%
    Joined:
    Feb 5, 2006
    Messages:
    11
    Likes Received:
    0
    2 options: you could change the crontab and remove the test -x /usr/sbin/anacron or remove anacron itself.

    The daily script isn't running at the time you changed in the original crontab, because you probably have anacron installed. Plesk 9 does not support anacron and anacron is not started regularly on a server. Otherwise anacron would have ran the cron.daily. But anacron doesn't get started and therefore it doesn't. And next to that, because it is installed cron doesn't do job either. Guess you run 8.04 right? Believe this issue is solved in Ubuntu 9.

    Last option could also be to run anacron through cron.
     
  10. Jeffry26

    Jeffry26 New Pleskian

    22
    57%
    Joined:
    Feb 5, 2006
    Messages:
    11
    Likes Received:
    0
Loading...