Defined Type: wikistats::cronjob::update

Defined in:
modules/wikistats/manifests/cronjob/update.pp

Overview

define a cronjob to update a wikistats table usage: <project prefix>@<hour>



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'modules/wikistats/manifests/cronjob/update.pp', line 3

define wikistats::cronjob::update() {

    $project = regsubst($name, '@.*', '\1')
    $hour    = regsubst($name, '.*@', '\1')

    cron { "cron-wikistats-update-${name}":
        ensure  => present,
        command => "/usr/bin/php /usr/lib/wikistats/update.php ${project} > /var/log/wikistats/update_${name}.log 2>&1",
        user    => 'wikistatsuser',
        hour    => $hour,
        minute  => 0,
    }
}