2009-12-10 20:52:50 +01:00
|
|
|
class mysql::server::cron::optimize {
|
|
|
|
|
|
|
|
file { 'mysql_optimize_script':
|
2010-04-02 17:48:13 +02:00
|
|
|
path => '/usr/local/sbin/optimize_mysql_tables.rb',
|
2010-08-11 15:57:43 +02:00
|
|
|
source => "puppet:///modules/mysql/scripts/optimize_tables.rb",
|
2009-12-10 20:52:50 +01:00
|
|
|
owner => root, group => 0, mode => 0700;
|
|
|
|
}
|
|
|
|
|
|
|
|
cron { 'mysql_optimize_cron':
|
2010-04-02 17:48:13 +02:00
|
|
|
command => '/usr/local/sbin/optimize_mysql_tables.rb',
|
2009-12-10 20:52:50 +01:00
|
|
|
user => 'root',
|
|
|
|
minute => 40,
|
|
|
|
hour => 6,
|
|
|
|
weekday => 7,
|
|
|
|
require => [ Exec['mysql_set_rootpw'], File['mysql_root_cnf'], File['mysql_optimize_script'] ],
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|