diff --git a/etc/cron.daily/sigi b/etc/cron.daily/sigi deleted file mode 100644 index 2770a84..0000000 --- a/etc/cron.daily/sigi +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -cd /srv/sigi/sigi/ -python manage.py atualiza_uso_servico -v 0 -python manage.py clearsessions -v 0 diff --git a/etc/cron.hourly/sigi b/etc/cron.hourly/sigi deleted file mode 100644 index 0017b2f..0000000 --- a/etc/cron.hourly/sigi +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd /srv/sigi/sigi -python manage.py gera_map_data diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp index e63e55f..068e284 100644 --- a/puppet/manifests/site.pp +++ b/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", +}