Skip to content

Include at_time in Job string representation (closes #635) - #675

Open
zheng-guannan577 wants to merge 2 commits into
dbader:masterfrom
zheng-guannan577:fix-schedule-635
Open

zheng-guannan577 wants to merge 2 commits into
dbader:masterfrom
zheng-guannan577:fix-schedule-635

Conversation

@zheng-guannan577

Copy link
Copy Markdown

修复 #635:#635

变更说明:

  • 在 schedule/init.py 中,Job.str 在 at_time 已设置时,在字符串末尾追加 , at=HH:MM:SS(例如 at=10:30:00);未设置 at_time 时,格式保持不变。
  • 该修复使 get_jobs() 等输出能够显示通过 .at() 设置的时间,解决 get_jobs() missing information on ".at()" #635 中缺少 .at() 信息的问题。

新增测试:

  • test_schedule.py:test_job_str_includes_at_time,验证设置 at("10:30") 的任务字符串包含 , at=10:30:00,且未设置 at_time 的任务字符串不包含 , at=。

本地测试结果:

  • test_schedule.py:82 passed。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant