diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-26 12:18:23 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-26 12:18:23 -0400 |
commit | 552fa7b683dcdcbbc58dc2871e31f54d8db14a64 (patch) | |
tree | 39daf6c95bf06c9454a82bc8abeda8aafdb56b7e /doc/server/plugins/generators/examples/cheetah/crontab.txt | |
parent | 4450ee60e1797456bc5bbc2ccf79717185da46f2 (diff) | |
download | bcfg2-552fa7b683dcdcbbc58dc2871e31f54d8db14a64.tar.gz bcfg2-552fa7b683dcdcbbc58dc2871e31f54d8db14a64.tar.bz2 bcfg2-552fa7b683dcdcbbc58dc2871e31f54d8db14a64.zip |
rolled genshi/cheetah docs into cfg, deprecated old tgenshi/tcheetah docs
Diffstat (limited to 'doc/server/plugins/generators/examples/cheetah/crontab.txt')
-rw-r--r-- | doc/server/plugins/generators/examples/cheetah/crontab.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/server/plugins/generators/examples/cheetah/crontab.txt b/doc/server/plugins/generators/examples/cheetah/crontab.txt new file mode 100644 index 000000000..4fe5485c3 --- /dev/null +++ b/doc/server/plugins/generators/examples/cheetah/crontab.txt @@ -0,0 +1,26 @@ +.. -*- mode: rst -*- + +============================ +Writing crontab with Cheetah +============================ + +This example randomizes the time of cron.daily +execution with a stable result. Cron.daily is run at a consistent, +randomized time between midnight and 7am.:: + + #import random + #silent random.seed($self.metadata.hostname) + + # /etc/crontab: system-wide crontab + # Unlike any other crontab you don't have to run the `crontab` + # command to install the new version when you edit this file. + # This file also has a username field, that none of the other crontabs do. + + SHELL=/bin/sh + PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin://bin + + # m h dom mon dow user command + 17 * * * * root run-parts --report /etc/cron.hourly + $random.randrange(0,59) $random.randrange(0,6) * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily + 47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly + 52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly. |