Config:...Crontab(3)

πŸ“¦ version 1.0, in epel 9

πŸŽ€ Config::Generator::Crontab πŸŽ€

okay so bestie, welcome to Config:...Crontab(3) β€” yes that's the manual page name, pls don't come for me, the dots are just how it gets abbreviated in the header, it's literally Config::Generator::Crontab and it's a Perl module πŸ’…


✨ NAME ✨

Config::Generator::Crontab β€” the crontab support squad for Config::Generator. that's it, that's the name, she's simple and she knows it 🫢


🌸 DESCRIPTION 🌸

okay so real talk: this module eases the generation of crontabs. lowkey she's a little matchmaker between your Perl hash and /etc/cron.d and honestly? she ate. πŸ”₯

here's the whole vibe: a crontab is represented by a hash πŸ’–. one optional special key lives in there named "mailto" β€” that's the one that says who should receive the cron reports, like the person who gets the group chat notifications. and then all the other keys? those are for the cron entries themselves, each one just vibing in the hash with its own name.

for instance, look at this iconic little setup:

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

see how cute that is? πŸ₯Ί

now the <{rnd*}> tokens β€” those little cuties get replaced by pseudo-random numbers in the given range (24 or 60), and those numbers are provided by the Config::Generator::Random module. so your crontab gets a little sprinkle of chaos ✨ but like, controlled chaos, the good kind.


πŸ¦‹ FUNCTIONS πŸ¦‹

this module provides the following functions β€” and heads up bestie, none of them are exported by default, so you gotta call them properly, no free rides πŸ’€

  • format_crontab(HASH) β€” transforms the crontab abstraction represented by the given HASH into a string suitable to be saved under the /etc/cron.d directory. that's the whole glow-up: hash in, real actual crontab file string out πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

Lionel Cons <http://cern.ch/lionel.cons> 🌈

Copyright (C) CERN 2013-2016


okay that's the whole page, mwah πŸ’‹ and for the sign-off β€” this was perl v5.32.1, dated 2019-07-26, so yeah she's been iconic since way back, no cap πŸŽ€πŸ’œ

πŸ“¦ where this page comes from