Files
KingJin-web-zy/胖乖/胖乖生活日志清理.py
2025-09-13 14:20:00 +08:00

15 lines
465 B
Python
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.
# 如果出现每日积分为2或者运行脚本自动跳过任务运行该脚本之后再运行主脚本即可
# cron = 01 00 * * * # 每天凌晨0点区分开始执行任务
import os
import time
# 设定要删除的脚本路径和名称
script_path = 'pgsh.json'
# 检查文件是否存在
if os.path.exists(script_path):
os.remove(script_path)
print(f"脚本 {script_path} 已删除。")
else:
print(f"脚本 {script_path} 不存在。")