Cronjob script changes pulled from the production server after the switch to python 3.

- Legacy-Id: 17326
This commit is contained in:
Henrik Levkowetz 2020-02-23 01:28:16 +00:00
parent fa9427769a
commit cf56beb8cc
4 changed files with 12 additions and 4 deletions

View file

@ -4,20 +4,22 @@
# #
# This script is expected to be triggered by cron from # This script is expected to be triggered by cron from
# /etc/cron.d/datatracker # /etc/cron.d/datatracker
export LANG=en_US.UTF-8
export PYTHONIOENCODING=utf-8
# Make sure we stop if something goes wrong: # Make sure we stop if something goes wrong:
program=${0##*/} program=${0##*/}
trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)"; exit 1' ERR trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)"; exit 1' ERR
# Run the hourly jobs first
$DTDIR/bin/hourly
# Datatracker directory # Datatracker directory
DTDIR=/a/www/ietf-datatracker/web DTDIR=/a/www/ietf-datatracker/web
cd $DTDIR/ cd $DTDIR/
logger -p user.info -t cron "Running $DTDIR/bin/daily" logger -p user.info -t cron "Running $DTDIR/bin/daily"
# Run the hourly jobs first
$DTDIR/bin/hourly
# Set up the virtual environment # Set up the virtual environment
source $DTDIR/env/bin/activate source $DTDIR/env/bin/activate

View file

@ -4,6 +4,8 @@
# #
# This script is expected to be triggered by cron from # This script is expected to be triggered by cron from
# /etc/cron.d/datatracker # /etc/cron.d/datatracker
export LANG=en_US.UTF-8
export PYTHONIOENCODING=utf-8
# Make sure we stop if something goes wrong: # Make sure we stop if something goes wrong:
program=${0##*/} program=${0##*/}
@ -70,6 +72,6 @@ mv $TMPFILE6 $DOWNLOAD/id-abstract.txt
mv $TMPFILE7 $ID/all_id2.txt mv $TMPFILE7 $ID/all_id2.txt
# Create and update group wikis # Create and update group wikis
$DTDIR/ietf/manage.py create_group_wikis #$DTDIR/ietf/manage.py create_group_wikis
# exit 0 # exit 0

View file

@ -4,6 +4,8 @@
# #
# This script is expected to be triggered by cron from # This script is expected to be triggered by cron from
# /etc/cron.d/datatracker # /etc/cron.d/datatracker
export LANG=en_US.UTF-8
export PYTHONIOENCODING=utf-8
DTDIR=/a/www/ietf-datatracker/web DTDIR=/a/www/ietf-datatracker/web
cd $DTDIR/ cd $DTDIR/

View file

@ -4,6 +4,8 @@
# #
# This script is expected to be triggered by cron from # This script is expected to be triggered by cron from
# /etc/cron.d/datatracker # /etc/cron.d/datatracker
export LANG=en_US.UTF-8
export PYTHONIOENCODING=utf-8
DTDIR=/a/www/ietf-datatracker/web DTDIR=/a/www/ietf-datatracker/web
cd $DTDIR/ cd $DTDIR/