Browse Source

Puppet: tarefas periodicas na cron

producao
Marcio Mazza 10 years ago
parent
commit
c713c3ab95
  1. 4
      etc/cron.daily/sigi
  2. 3
      etc/cron.hourly/sigi
  3. 21
      puppet/manifests/site.pp

4
etc/cron.daily/sigi

@ -1,4 +0,0 @@
#!/bin/bash
cd /srv/sigi/sigi/
python manage.py atualiza_uso_servico -v 0
python manage.py clearsessions -v 0

3
etc/cron.hourly/sigi

@ -1,3 +0,0 @@
#!/bin/bash
cd /srv/sigi/sigi
python manage.py gera_map_data

21
puppet/manifests/site.pp

@ -174,3 +174,24 @@ nginx::resource::location { '/media/':
vhost => $sigi_vhost,
location_alias => '/srv/sigi/media/',
}
###########################################################################
# CRON
cron { 'atualiza_uso_servico':
command => "${sigi_venv_dir}/bin/python ${sigi_dir}/manage.py atualiza_uso_servico -v 0",
user => 'sigi',
hour => [0,]
}
cron { 'clearsessions':
command => "${sigi_venv_dir}/bin/python ${sigi_dir}/manage.py clearsessions -v 0",
user => 'sigi',
hour => [0,]
}
cron { 'gera_map_data':
command => "${sigi_venv_dir}/bin/python ${sigi_dir}/manage.py gera_map_data",
user => 'sigi',
hour => "*/1",
}

Loading…
Cancel
Save