From: Benjamin Mako Hill Date: Tue, 7 Apr 2020 21:45:05 +0000 (-0700) Subject: Merge pull request #20 from makoshark/master X-Git-Url: https://code.communitydata.science/covid19.git/commitdiff_plain/refs/heads/master?hp=1a27b680619e7ecebc52d5b1110ad758e36f3829 Merge pull request #20 from makoshark/master bug fix: change to the correct working directory before running cron jobs --- diff --git a/cron-wikipedia_revisions.sh b/cron-wikipedia_revisions.sh old mode 100644 new mode 100755 index 5ba02ed..f836c47 --- a/cron-wikipedia_revisions.sh +++ b/cron-wikipedia_revisions.sh @@ -1,5 +1,8 @@ #!/bin/bash -x +WORKING_DIR="/home/SOC.NORTHWESTERN.EDU/bmh1867/covid19" +cd $WORKING_DIR + TZ="UTC" date_string=$(date +%Y%m%d) @@ -15,3 +18,4 @@ mv wikipedia/data/${revs_tsv} /var/www/covid19/wikipedia revs_json="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.json" xz wikipedia/data/${revs_json} mv wikipedia/data/${revs_json}.xz /var/www/covid19/wikipedia + diff --git a/cron-wikipedia_views.sh b/cron-wikipedia_views.sh old mode 100644 new mode 100755 index 4afe380..bb2f621 --- a/cron-wikipedia_views.sh +++ b/cron-wikipedia_views.sh @@ -1,5 +1,8 @@ #!/bin/bash -x +WORKING_DIR="/home/SOC.NORTHWESTERN.EDU/bmh1867/covid19" +cd $WORKING_DIR + TZ="UTC" date_string=${OVERRIDE_DATE_STRING:-$(date +%Y%m%d)}