Log clean session cron output

Cron jobs should be silent on normal operation, and only emit output
on error.  Redirect stdout from the clean_sessions job to a file.

Change-Id: Ifdd2b38248970204acd17944b21e1c39de92332a
This commit is contained in:
James E. Blair 2015-08-04 09:06:10 -07:00
parent a627758a88
commit 6f4b10a63a
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
#!/bin/bash
cd <%= @site_root %>/config
python manage.py clean_session
DATE=`date --rfc-3339=seconds`
echo "Start clean session run at $DATE" >><%= @site_root %>/log/clean_session.log
python manage.py clean_session >><%= @site_root %>/log/clean_session.log
DATE=`date --rfc-3339=seconds`
echo "End clean session run at $DATE" >><%= @site_root %>/log/clean_session.log