Skip to content

Include configured at time in Job string output - #663

Open
BP202302 wants to merge 1 commit into
dbader:masterfrom
BP202302:show-at-time-in-job-string
Open

BP202302 wants to merge 1 commit into
dbader:masterfrom
BP202302:show-at-time-in-job-string

Conversation

@BP202302

@BP202302 BP202302 commented Oct 6, 2026

Copy link
Copy Markdown

Printing jobs with the same callback and hourly interval currently produces identical descriptions even when each job has a different .at() setting, as reported in #635.

Include the configured time in Job.__str__ when present, using the same canonical time representation as Job.__repr__. For example, an hourly job with .at(":10") now prints:

Job(interval=1, unit=hours, at=00:10:00, do=job, args=(), kwargs={})

Jobs without .at() keep their existing string output. The regression tests cover the six hourly offsets in the report, as well as daily, hourly and minute schedules with callback arguments.

Validation:

  • Reproduced the failure on the original implementation with the new regression tests.
  • Python 3.12.3: python -m pytest test_schedule.py schedule -v --cov schedule --cov-report term-missing — 83 tests and 3 subtests passed; 99% coverage.
  • Python 3.9.25 without pytz: same suite — 42 passed, 41 skipped.
  • python -m mypy -p schedule — passed.
  • Black 20.8b1 on Python 3.9: black --check . — passed.
  • git diff --check — passed.

Refs #635.

AI disclosure: this change and its regression tests were prepared and checked with Codex assistance. The test results above are from actual local runs.

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