RickyL-2000 / ZJU_Clockin_modified

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic Clockin for ZJU

Following idlesilver/ZJU_auto_health_report。浙江大学健康打卡。

基础配置

  1. 安装 yagmail 第三方库 用于邮件通知
    pip install yagmail
    # 2022-3-5 亲测最新版的yagmail有些问题,会出现没有邮件正文的情况,安装旧版本可以解决这个问题,建议以下命令。
    pip install yagmail==0.14.260
    
  2. 打开或新建 basic_info.py 填写相应配置,模板参考basic_info_template.py
  3. windows运行 打卡.bat,linux服务器参考下文

注意:这里的 EMAIL_PASSWD 不是邮箱密码,而是授权码AUTHCODE。什么是授权码,它又是如何设置?_QQ邮箱帮助中心

自动周期

windows

参考win10设置每天定时开机方法。把最后一步的 程序与脚本 选择为目录中的 打卡.bat

注意:Windows自动周期本人未实现过,不保证可行。

linux

使用 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/

About

License:MIT License


Languages

Language:Python 99.8%Language:Batchfile 0.2%