Co-creation-projects/lh2021739-pixel-Personal_Information_Signaling_System/桌面提醒设置说明.md
设置Windows任务计划程序,每天23:30自动弹出提醒窗口,提醒写日报。
如果项目有自己的虚拟环境(.venv 目录):
配置信息:
程序或脚本:
C:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exe
添加参数(可选):
daily_reminder.py
起始于(可选):
C:\Python\pythonprogram\Personal_Information_Signaling_System
如果使用系统安装的 Python(已添加到 PATH):
配置信息:
程序或脚本:
python.exe
添加参数(可选):
daily_reminder.py
起始于(可选):
C:\Python\pythonprogram\Personal_Information_Signaling_System
配置信息:
程序或脚本:
C:\Python\pythonprogram\Personal_Information_Signaling_System\daily_reminder.py
起始于(可选):
C:\Python\pythonprogram\Personal_Information_Signaling_System
cd C:\Python\pythonprogram\Personal_Information_Signaling_System
dir .venv\Scripts\python.exe
如果存在,使用:
C:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exe
在命令行输入:
where python
会显示 Python 的完整路径,例如:
C:\Python\python311\python.exe
cd C:\Python\pythonprogram\Personal_Information_Signaling_System
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
然后使用方案 1 的配置。
Win + R 打开运行对话框taskschd.msc 并回车每日写日报提醒每天23:30提醒写日报23:30:00选择"启动程序"
点击"下一步"
在"程序或脚本"中输入Python的完整路径:
C:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exe
(如果项目有虚拟环境)
或者使用系统 Python:
python.exe
(需要确保 Python 已添加到系统 PATH)
在"添加参数"中输入:
daily_reminder.py
在"起始于"中输入脚本所在目录:
C:\Python\pythonprogram\Personal_Information_Signaling_System
(请根据你的实际路径修改)
点击"下一步"
在任务属性对话框中:
常规选项卡:
条件选项卡:
设置选项卡:
点击"确定"保存
pip install Pillowassets/person.pngwrite_report.py 是否存在如果需要开机自启动提醒服务(后台运行):
创建启动脚本 start_reminder_service.bat:
@echo off
cd /d C:\Python\pythonprogram\Personal_Information_Signaling_System
C:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exe daily_reminder_service.py
将脚本添加到启动文件夹:
Win + R,输入 shell:startupstart_reminder_service.bat 的快捷方式放入此文件夹assets/person.png 或 assets/person.jpg 存在如果需要删除任务:
如果你之前已经设置了桌面提醒任务,但项目路径已更改,需要更新任务配置:
如果之前已经设置了桌面提醒任务,任务中可能包含以下路径:
C:\Python\pythonprogram\datawhale_Agent\PersonalizationMCP-main\daily_reminder.pyC:\Python\pythonprogram\datawhale_Agent\PersonalizationMCP-mainC:\Python\pythonprogram\datawhale_Agent\.venv\Scripts\python.exeC:\Python\pythonprogram\Personal_Information_Signaling_System\daily_reminder.pyC:\Python\pythonprogram\Personal_Information_Signaling_SystemC:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exepython.exe(如果已添加到系统 PATH)Win + R 打开运行对话框taskschd.msc 并按回车每日写日报提醒Daily Report Reminder写日报提醒在"操作"标签页中,更新以下字段:
程序或脚本:
旧值: C:\Python\pythonprogram\datawhale_Agent\PersonalizationMCP-main\daily_reminder.py
新值: C:\Python\pythonprogram\Personal_Information_Signaling_System\daily_reminder.py
或者,如果使用 Python 解释器直接运行:
旧值: C:\Python\pythonprogram\datawhale_Agent\.venv\Scripts\python.exe
新值: C:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exe
(如果项目有虚拟环境)
添加参数(可选):
如果程序或脚本是 Python 解释器,这里应该填写:
daily_reminder.py
起始于:
旧值: C:\Python\pythonprogram\datawhale_Agent\PersonalizationMCP-main
新值: C:\Python\pythonprogram\Personal_Information_Signaling_System
如果你熟悉命令行,可以使用以下 PowerShell 命令:
# 1. 查看现有任务
Get-ScheduledTask | Where-Object {$_.TaskName -like "*日报*" -or $_.TaskName -like "*reminder*"}
# 2. 获取任务的操作配置
$task = Get-ScheduledTask -TaskName "你的任务名称"
$task.Actions
# 3. 更新任务操作(需要管理员权限)
$action = New-ScheduledTaskAction -Execute "C:\Python\pythonprogram\Personal_Information_Signaling_System\daily_reminder.py" -WorkingDirectory "C:\Python\pythonprogram\Personal_Information_Signaling_System"
Set-ScheduledTask -TaskName "你的任务名称" -Action $action
设置或更新任务计划程序后,请确认:
程序或脚本: C:\Python\pythonprogram\Personal_Information_Signaling_System\.venv\Scripts\python.exe
添加参数: daily_reminder.py
起始于: C:\Python\pythonprogram\Personal_Information_Signaling_System
程序或脚本: python.exe
添加参数: daily_reminder.py
起始于: C:\Python\pythonprogram\Personal_Information_Signaling_System