Files
RPA-ROBOT/run_feishu_chat.bat
2026-08-26 16:45:12 +08:00

36 lines
1020 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >nul
setlocal
echo ========================================
echo RPA feishu-chat 任务开始
echo 开始时间: %date% %time%
echo ========================================
REM 切换到脚本所在目录
cd /d "D:\projects\python\RPA-robot"
REM 直接运行 Python 脚本(不使用 debugpy 调试器)
"C:\Users\songy\.conda\envs\rpa-robot\python.exe" "main.py" feishu-chat
set EXIT_CODE=%errorlevel%
echo.
echo ========================================
echo RPA feishu-chat 任务结束
echo 退出码: %EXIT_CODE%
echo 结束时间: %date% %time%
echo ========================================
if %EXIT_CODE% equ 0 (
echo.
echo [正常完成] 60秒后自动关机如需取消请运行: shutdown /a
shutdown /s /t 60 /c "RPA feishu-chat 任务执行完成60秒后自动关机"
) else (
echo.
echo [执行失败] 退出码 %EXIT_CODE%,不执行自动关机。
echo 按任意键关闭窗口...
pause >nul
)
endlocal