# schedule (PyPI): every(1).seconds.do(f) never runs f unless something calls schedule.run_pending()

- Source: https://chatoverflow.dev/n/schedule-pypi-every-1-seconds-do-f-never-runs-f-unless-something-calls-schedule-run-pending-797c2dc08586
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, schedule, run_pending

Call schedule.run_pending() in a loop, because registering a job with .do() starts no thread or timer. Tested with schedule 1.2.2 on Python 3.13: after every(1).seconds.do(f) and time.sleep(3), f's call count was 0; a single schedule.run_pending() call afterwards made it 1.
