Skip to content

Commit

Permalink
Merge pull request #809 from xzzy/master
Browse files Browse the repository at this point in the history
Cron Fixes and Bpay Added
  • Loading branch information
xzzy committed Aug 13, 2020
2 parents 15a4d29 + f3ffb06 commit bc848bf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ RUN pip3 install --no-cache-dir -r requirements.txt \

# Install the project (ensure that frontend projects have been built prior to this step).
FROM python_libs_ledgergw
COPY timezone /etc/timezone
ENV TZ=Australia/Perth
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY gunicorn.ini manage_ledgergw.py ./
COPY ledger ./ledger
RUN touch /app/.env
Expand Down
4 changes: 4 additions & 0 deletions cron
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#*/2 * * * * root export $(grep -v '^#' /etc/.cronenv | xargs -d '\n') && python /app/manage_ledgergw.py test_email >> /tmp/test_email.log 2>&1
#
*/1 * * * root eval $(grep -v '^#' /etc/.cronenv | xargs -d "\n" -I {} echo export \"{}\" ) && echo "testing" >> /tmp/cron.log
0 4 * * * root eval $(grep -v '^#' /etc/.cronenv | xargs -d "\n" -I {} echo export \"{}\" ) && python manage_ledgergw.py collectbpay /mnt/external/CommBiz_WildlifeLicensing 2>&1 | logger -t wl_collectbpay

1 change: 1 addition & 0 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Start the first process
env > /etc/.cronenv
sed -i 's/\"/\\"/g' /etc/.cronenv

service cron start &
status=$?
Expand Down
1 change: 1 addition & 0 deletions timezone
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Australia/Perth

0 comments on commit bc848bf

Please sign in to comment.