jobflow_remote.utils.schedule module#

Scheduling tools based on the schedule module.

class jobflow_remote.utils.schedule.SafeScheduler(reschedule_on_failure: bool = True, seconds_after_failure: int = 0)[source]#

Bases: Scheduler

An implementation of Scheduler that catches jobs that fail, logs their exception tracebacks as errors, optionally reschedules the jobs for their next run time, and keeps going.

Adapted from https://gist.github.com/mplewis/8483f1c24f2d6259aef6

If reschedule_on_failure is True, jobs will be rescheduled for their next run as if they had completed successfully. If False, they’ll run on the next run_pending() tick.