1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

periodic and cron doubt

Discussion in 'General' started by fluca1978, Nov 3, 2011.

  1. fluca1978

    fluca1978 New Member

    Messages:
    733
    Likes Received:
    0
    Hi,
    I'm not sure what the real purpose of periodic is. Periodic is launched via cron, and it seems to me works only as a "container" for a set of script that can be managed via a single cron line. But I guess there is something more than reduce typing in crontab, maybe a specific environment settings? What is the added value of periodic to cron?
     
  2. mix_room

    mix_room Member

    Messages:
    589
    Likes Received:
    0
    On my machines the outputs of all periodic jobs are collated into one nice email.

    I get one daily status mail per machine, one security, one weekly, one monthly.
    Instead of getting a number of cron-emails.

    I like it.
     
  3. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,409
    Likes Received:
    2
    Periodic scripts are run on a daily, weekly, and monthly basis. These are "cron" jobs that do a bunch of administrative tasks. All of the periodic scripts are configured via a single config file /etc/periodic.conf with defaults pre-set in /etc/defaults/periodic.conf. You can pick and choose which periodic scripts are run, and when.

    Think of periodic like a set of canned cron jobs that can give you all kinds of insight into how your system is working, with nicely formatted, easy-to-read combined e-mail messages (one per periodic run).

    It provides a nice separation, IMO, between user tasks (user crontabs), system tasks (/etc/crontab), and system administrivia tasks (periodic).

    Just imagine the mess if that would be /etc/crontab if each and every single periodic script was listed in there, with comments about what they do, most commented out. :)
     
  4. fluca1978

    fluca1978 New Member

    Messages:
    733
    Likes Received:
    0
    Thanks, in fact it is a mess on systems that do not present this type of scheduling (I mean the crontab is really messed up).
     
  5. fluca1978

    fluca1978 New Member

    Messages:
    733
    Likes Received:
    0
    Sorry to pick up again this thread, but I'm curious: is there a particular difference between period and (ana)cron daily/weekly run parts?
     
  6. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,427
    Likes Received:
    16
    If you mean like the anacron from Red Hat then no,there isn't really a difference.

    It may have been implemented differently but the results are the same. It runs one or more scripts on a daily, weekly and/or monthly basis.