Following idlesilver/ZJU_auto_health_report。浙江大学健康打卡。
- 安装 yagmail 第三方库 用于邮件通知
pip install yagmail # 2022-3-5 亲测最新版的yagmail有些问题,会出现没有邮件正文的情况,安装旧版本可以解决这个问题,建议以下命令。 pip install yagmail==0.14.260
- 打开或新建
basic_info.py
填写相应配置,模板参考basic_info_template.py
- windows运行
打卡.bat
,linux服务器参考下文
注意:这里的
EMAIL_PASSWD
不是邮箱密码,而是授权码AUTHCODE。什么是授权码,它又是如何设置?_QQ邮箱帮助中心
参考win10设置每天定时开机方法。把最后一步的 程序与脚本
选择为目录中的 打卡.bat
注意:Windows自动周期本人未实现过,不保证可行。
使用 crontab
。注意在ubuntu环境下使用cron命令而不是crond命令。
crontab -e
新增一行,注意path_to_python_interpreter
换成对应的conda或venv环境
0 8 * * * ${path_to_python_interpreter} ${path_to_project_dir}/ZJU_auto_health_report/clock-in.py >/dev/null 2>&1
校友提供的自动打卡网站:https://tool.zjucjh.com:666/dk/