Reminds you to fill in the OA daily report at a scheduled time every day, and automatically opens the daily report filling page when reminding.
Quick Start
cd skills/oa-daily-report/scripts
# 设置每日提醒(每天 17:30)
.\setup_reminder.ps1
# 查看提醒是否设置成功
schtasks /Query /TN "OA-Daily-Report-Reminder"
# 取消提醒
.\remove_reminder.ps1
Note: On first run, you need to run PowerShell asadministratorrun PowerShell
System Requirements
- Windows 10 or Windows 11
- PowerShell 5.1 or later
- Administrator privileges (used to create scheduled tasks)
How It Works
- Scheduled trigger: Uses Windows Task Scheduler to automatically run the reminder script every day at 17:30
- Send notification: Displays a system balloon notification reminding you to fill in the daily report
- Auto open: Automatically opens the browser to the daily report filling page at the same time the notification is displayed
- Page address: https://oa.luckyxp.cn/pcc_web/#/daily-edit/create
Script Description
daily_reminder.ps1
Scheduled reminder script, called by Task Scheduler.
- Sends a system balloon notification reminding you to fill in the daily report
- Automatically opens the default browser to the OA daily report page
- Parameters can be customized:
-Url: Daily report page URL-Title: Notification title-Message: Notification content-DisplayTime: Notification display duration (milliseconds)
setup_reminder.ps1
Registers the daily scheduled task.
- Sets the reminder to run every day at 17:30 (time can be customized)
- Uses Windows Task Scheduler
- Automatically detects whether the task already exists
Parameters:
-Time: Reminder time (default 17:30, 24-hour format)-TaskName: Task name (default OA-Daily-Report-Reminder)
remove_reminder.ps1
Cancels the daily scheduled task.
- Removes the scheduled task that has been set
- Completely clears the reminder configuration
- Automatically detects whether the task exists
Usage
Set daily reminder
# 以管理员身份运行 PowerShell
cd skills/oa-daily-report/scripts
.\setup_reminder.ps1
Example output:
========================================
OA 日报提醒定时任务注册
========================================
检查文件... OK
检查现有任务... 无
正在创建任务计划...
任务名称: OA-Daily-Report-Reminder
执行时间: 每天 17:30
执行脚本: C:\...\daily_reminder.ps1
========================================
✅ 定时任务创建成功!
========================================
任务详情:
- 任务名称: OA-Daily-Report-Reminder
- 执行时间: 每天 17:30
Verify reminder settings
schtasks /Query /TN "OA-Daily-Report-Reminder"
Customize reminder time
# 设置每天 18:00 提醒
.\setup_reminder.ps1 -Time "18:00"
Cancel reminder
.\remove_reminder.ps1
Manually trigger reminder
.\daily_reminder.ps1
Will immediately send a system notification and automatically open the daily report page.
Notes
- Administrator privileges: Creating and deleting scheduled tasks requires administrator privileges
- Reminder time: Default 17:30, customizable
- Browser: Uses the system default browser to open the daily report page
- Notification: Automatically opens the browser at the same time the balloon notification is displayed
Troubleshooting
"Access denied" prompt
Need to run PowerShell as administrator:
- Right-click the PowerShell icon
- Select "Run as administrator"
Notification does not appear
- Check whether system notification settings are enabled
- Check whether it is blocked by security software
Browser does not open automatically
- Check the default browser settings
- Manually click the link in the notification
Technical Reference
- Notification method: Windows Forms NotifyIcon (balloon notification)
- Scheduled task: Windows Task Scheduler (schtasks)
- Open browser: Start-Process cmdlet