标签:技术 控制面板 family read pre span 任务计划 mon 计划任务
mail_receive_monitor05.py
import zmail from tkinter import * import tkinter.messagebox server = zmail.server(‘reblue520@163.com‘, ‘reblue.520‘) mail = server.get_latest() new_id = mail[‘id‘] file_read = open(‘id.txt‘, ‘r‘) old_id = file_read.readline() file_write = open(‘id.txt‘, ‘w‘) file_write.write(str(new_id)) file_write.close() if old_id != str(new_id): main_window = Tk() main_window.withdraw() tkinter.messagebox.showinfo("你有邮件了", ‘老铁,你的邮件来了,瞅一眼吧\n,邮件标题:%s‘ % mail[‘subject‘])
Win10计划任务 -> 控制面板 -> 管理工具 -> 任务计划程序
执行频率
运行程序:D:\python\mooc_uinversity_songtian\python_email\run.bat
添加参数:D:\python\mooc_uinversity_songtian\python_email\run.bat
起始于:D:\python\mooc_uinversity_songtian\python_email\
标签:技术 控制面板 family read pre span 任务计划 mon 计划任务
原文地址:https://www.cnblogs.com/reblue520/p/12490053.html