Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandersande18 committed May 14, 2022
1 parent 4a464d6 commit a90dc9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ ENV APP_PATH="/"
ENV LC_ALL="C.UTF-8"

COPY ./main.py ./slide.py ./scheduler.py ./requirements.txt $APP_PATH/

ARG DEBIAN_FRONTEND=noninteractive
# install packages & config docker
RUN apt-get update && \
apt-get upgrade -y &&\
apt-get -y install python3 pip && \
apt-get -y autoremove && \
apt-get clean

RUN pip install -r /requirements.txt && \
playwright install-deps firefox

RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone

RUN pip install -r /requirements.txt && \
playwright install-deps firefox

WORKDIR ${APP_PATH}

# RUN main.py
ENTRYPOINT [ "python", "/scheduler.py"]
ENTRYPOINT [ "python3", "/scheduler.py"]
5 changes: 3 additions & 2 deletions scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def job():


scheduler_report = BlockingScheduler()
scheduler_report.add_job(job, 'cron', day='*', hour="14", minute="11", args=[], misfire_grace_time=300)
scheduler_report.add_job(job, 'cron', day='*', hour="14", minute="13", args=[], misfire_grace_time=300)
scheduler_report.add_job(job, 'cron', day='*', hour="8", minute="15", args=[], misfire_grace_time=300)
scheduler_report.add_job(job, 'cron', day='*', hour="8", minute="50", args=[], misfire_grace_time=300)
scheduler_report.add_job(job, 'cron', day='*', hour="9", minute="15", args=[], misfire_grace_time=300)
print("job started", flush=True)
scheduler_report.start()

0 comments on commit a90dc9e

Please sign in to comment.