periodic and cron doubt

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

periodic and cron doubt

Postby fluca1978 » 03 Nov 2011, 17:01

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?
fluca1978
Member
 
Posts: 726
Joined: 20 May 2010, 08:53

Postby mix_room » 03 Nov 2011, 17:43

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.
mix_room
Member
 
Posts: 561
Joined: 07 Aug 2009, 16:31

Postby phoenix » 04 Nov 2011, 03:18

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 [file]/etc/periodic.conf[/file] with defaults pre-set in [file]/etc/defaults/periodic.conf[/file]. 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 ([file]/etc/crontab[/file]), and system administrivia tasks (periodic).

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

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
User avatar
phoenix
MFC'd
 
Posts: 3349
Joined: 17 Nov 2008, 05:43
Location: Kamloops, BC, Canada

Postby fluca1978 » 04 Nov 2011, 07:34

phoenix wrote:It provides a nice separation, IMO, between user tasks (user crontabs), system tasks ([file]/etc/crontab[/file]), and system administrivia tasks (periodic).

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


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).
fluca1978
Member
 
Posts: 726
Joined: 20 May 2010, 08:53

Postby fluca1978 » 11 Nov 2011, 08:59

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?
fluca1978
Member
 
Posts: 726
Joined: 20 May 2010, 08:53

Postby SirDice » 11 Nov 2011, 09:55

fluca1978 wrote:is there a particular difference between period and (ana)cron daily/weekly run parts?

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.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16185
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest