Lionel Cons


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


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\";
  $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.


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


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


Lionel Cons

Copyright (C) CERN 2013-2014