summaryrefslogtreecommitdiff
path: root/manifests/server/cron/optimize.pp
blob: 29ee66e6a082cd0e548e62c2653bd6bea95e891e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class mysql::server::cron::optimize {

   file { 'mysql_optimize_script':
       path => "${mysql_moduledir}/server/optimize_tables.rb",
       source => "puppet://${server}/modules/mysql/scripts/optimize_tables.rb",
       owner => root, group => 0, mode => 0700;
   }

    cron { 'mysql_optimize_cron':
        command => "${mysql_moduledir}/server/optimize_tables.rb",
        user => 'root',
        minute => 40,
        hour => 6,
        weekday => 7,
        require => [ Exec['mysql_set_rootpw'], File['mysql_root_cnf'], File['mysql_optimize_script'] ],
   }

}