Automatically punch in and out for 104 pro
- Please create
.env
and provide environment variables in it. ForPUNCH_MINUTE
,PUNCH_HOUR
,PUNCH_DAY_OF_WEEK
, andTIMEZONE
, please refer tocelery
for the setting.
ACUD=
ACCOUNT=
PASSWORD=
PUNCH_MINUTE=
PUNCH_HOUR=
PUNCH_DAY_OF_WEEK=
TIMEZONE=
For example:
ACUD=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ACCOUNT=XXXXX@example.com
PASSWORD=XXXXXXXXXX
PUNCH_MINUTE="0"
PUNCH_HOUR="9,18"
PUNCH_DAY_OF_WEEK="mon,tue,wed,thu,fri"
TIMEZONE="Asia/Taipei"
- For the
ACUD
, please log in https://bsignin.104.com.tw/login to get theACUD
from cookies. - Make sure you have
docker-compose
, then:
docker-compose up --build -d
- Everything is done!
Reomve the comment in the docker-compose.yml
. Then you can see the login and punch process at http://localhost:7900
.
version: "3"
services:
chrome-puncher:
image: selenium/standalone-chrome:119.0-chromedriver-119.0
container_name: pro-puncher-chrome
privileged: true
shm_size: 16gb
ports:
- "4444:4444" # monitor panel
- "7900:7900" # to check the process with the browser
environment:
- SE_VNC_NO_PASSWORD=1 # the password setting for the viewer
stdin_open: true
tty: true