Skip to main content
πŸ”’ Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial β†’
⚑
← Coursesβ€ΊPython for Office WorkersModule 7 Β· Reports & data Β· Recapβ€ΊπŸŽ― Review: Automation module 7 recapscenario39 / 54
+80 XP
Task
Build `schedule_runner(jobs, current_hour)` β€” the dispatcher every cron-style scheduler runs each hour: - `jobs` is a dict: `job_id (str) -> hour (int)`, hour ∈ `[0, 23]`. - `current_hour` is the wall-clock hour now. - Return a list of `job_id`s whose scheduled hour equals `current_hour`, **sorted ascending by job_id** (deterministic order is critical for run logs). - Empty dict β†’ empty list. - Invalid hour value in jobs (outside 0-23) β†’ skip that job (defensive β€” the config table might have stale rows).
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
πŸ“Š Result
Press Run to see result...

πŸ’¬ Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…