Choose an interval and a time budget
Suppose an hourly report usually takes 40 seconds and sometimes waits several minutes for a remote service. Choose the Scheduled Python script profile and use a script that exits after producing one report. The runner controls repetition. A loop that sleeps for an hour inside the script keeps the first run occupied.
JOB_INTERVAL_SECONDS=3600
JOB_TIMEOUT_SECONDS=300Save and restart. The hourly interval aligns to UTC boundaries. For example, a runner starting at 09:17 UTC targets 10:00 UTC. Free intervals start at 900 seconds and paid intervals at 300 seconds. Use 0 to pause recurrence during maintenance. The scheduler accepts intervals up to 604800 seconds.
Read the record of a single run
Upload the Python report example and select Run now in Runs. It prints a JSON object with a UTC completion time. Compare the start and finish times, exit result and output. Keep subprocesses in the foreground. The runner can terminate the process group when the time budget expires.
Replace the demonstration with your report and run it manually once. Have it print the reporting period and number of records written. A zero exit code after producing an empty report may be correct for a quiet hour. Recording the period lets you investigate that case without logging raw customer data.
Distinguish offline time from overlap
When the runner comes back after downtime, it counts scheduled occurrences missed while offline and advances to the next UTC boundary. It skips occurrences that arrive during an active job. A run interrupted by a restart can appear as interrupted on recovery. Inspect the skipped counts alongside the next occurrence and the previous run duration.
If an hourly task takes 70 minutes, increasing the timeout might let the report finish, but it still occupies the next boundary. Shorten the job, partition the work, or choose a longer interval. For a stopped deployment, restore the runner first and decide which missing periods actually need backfilling.
Resume without writing the same report twice
Give each report a stable period key, such as the starting UTC hour. Persist the last completed period in your own application state, and advance it after the report has been successfully written. On a later run, process unfinished periods in small batches within the time budget. A restart can then repeat a write for the same period safely if your destination supports replacing or deduplicating by that key.
The runner retains 12 recent outcomes with bounded output. Keep long-term report results separately. Test a manual rerun against an already completed period and compare the resulting record count. The Python deployment guide covers web apps and continuous workers if your project needs another execution mode.