Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchnet authored Jul 14, 2019
1 parent d0b5532 commit 621bfa2
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,11 @@
'''
}
```

3. 使用crontab进行定时运行
```Python
# 73行附近
# 账号
account = '*******'
# 密码
password = '******'
# 座位编号(要从网页端报文查看,不是我们平常看到的nbk360等格式)
sid = '******'
# 邮件接收者
to_user = '**********'
# 邮件发送者
my_sender = '*******'
# 邮箱密码(这里是设置授权码,并不是真正的密码)
my_pass = '*********'
# 配置发件人昵称
my_nick = '*********'
# 配置收件人昵称
to_nick = '**********'
```
3. 修改日志位置
```Python
# 第8行
logging.basicConfig(filename='***.log', level=logging.INFO, format=' %(asctime)s - %(levelname)s- %(message)s')
```
将这里filename后的值改成你想要日志保存的位置,**注意需要使用绝对路径**
4. 修改权限
3. 修改权限
使用```chmod +x Reserve.py```修改Reserve.py的运行权限

5. 使用crontab进行定时运行
4. 使用crontab进行定时运行
使用```crontab -l```命令查看当前用户的定时任务
使用```crontab -e```命令编辑文件来新建任务
其格式为```minute (m), hour (h), day of month (dom), month (mon),and day of week (dow), commond```, 使用```*```表示任意值
Expand Down

0 comments on commit 621bfa2

Please sign in to comment.