Python2 minutes to read

Can I run a Python script every 15 minutes for free?

Set a quarter-hour schedule on Spark, see how UTC boundaries determine the next run, and choose a timeout that fits your Python task.

Set the interval and the time budget

Yes. Bothosting’s Scheduled Python script supports a 15-minute interval on Spark. Set JOB_INTERVAL_SECONDS to 900. The minimum interval is 15 minutes on free and 5 minutes on paid plans. Keep the runner started and renew Spark every 7 days. Python hosting plans and runtimes.

For a script that normally checks a feed in 30 seconds, a timeout of 120 seconds gives it time to finish a slower request. Set an appropriate request timeout in your own code too. If the source is unavailable, record the error and let the script exit so you can see what happened in Runs.

Variables for a quarter-hour check
JOB_INTERVAL_SECONDS=900
JOB_TIMEOUT_SECONDS=120

When will the first report appear?

Intervals align to UTC boundaries. If you first start a new 900-second schedule at 09:07 UTC, its next scheduled time is 09:15 UTC. For this interval, the following times are 09:30 and 09:45. Save any changed settings and restart, then check the next occurrence shown in Runs.

For the first test, upload the Python report example and choose Run now. It prints its finish time. Compare that manual result with the next scheduled result so you know both the entry file and the scheduler work.

What if a run is still working?

The runner skips an overlapping occurrence while another run is active. Keep the work for a single check finite and allow the runner to wait for the next quarter hour. If the script spends most of the interval waiting on several slow sources, record their individual durations and split the work into smaller batches. Setting the interval to zero pauses scheduled starts after you save and restart. How to investigate a missed Python run.