Commit 560121be authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE

starting cron

parent 93d1e877
......@@ -87,6 +87,7 @@ else
msg_warning "settings.MEDIA_ROOT missing, passed"
fi
sudo /usr/sbin/service cron start
msg_info "Adding cron task to dump db every day"
cat <(crontab -l) <(echo "") <(echo "* * * * * . find $MEDIA_ROOT_DIR/ -type f -name 'Template*.xlsx' -mtime +1 -exec rm {} \; >> /code/persistent_volume/django-crontab.log 2>> /code/persistent_volume/django-crontab.err") | crontab -
......@@ -94,7 +95,7 @@ cat <(crontab -l) <(echo "") <(echo "* * * * * . find $MEDIA_ROOT_DIR/ -type f -
msg_info "Registering cron tasks"
if [ "$(pip freeze | grep django-crontab | wc -l )" == "1" ]; then
python manage.py crontab add
sudo /usr/sbin/service cron start
#sudo /usr/sbin/service cron start
grep = /code/resources/default.ini /code/resources/local.ini -h | sed "s/^\(.*\)$/export \1/g" > /home/kiwi/env.sh
echo "export ALLOWED_HOSTS=$ALLOWED_HOSTS" >> /home/kiwi/env.sh
echo "export DEBUG=$DEBUG" >> /home/kiwi/env.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment