NAME

Config::Generator::Crontab - Config::Generator crontab support

DESCRIPTION

This module eases the generation of crontabs.

A crontab is represented by a hash with one optional special key (mailto representing who should receive the cron reports) and the other keys for the cron entries themselves. For instance:

$cron{mailto}    = "john.doe\@acme.org";
$cron{hourlyfoo} = "<{rnd60}> * * * * foo --option 3";
$cron{dailybar}  = "<{rnd60}> <{rnd24}> * * * bar";
$contents = format_crontab(%cron);

The "<{rnd*}>" tokens will be replaced by pseudo-random numbers in the given range (24 or 60), provided by the Config::Generator::Random module.

FUNCTIONS

This module provides the following functions (none of them being exported by default):

format_crontab(HASH)

transform the crontab abstraction represented by the given HASH into a string suitable to be saved under the /etc/cron.d directory

AUTHOR

Lionel Cons http://cern.ch/lionel.cons

Copyright (C) CERN 2013-2014