runtraj.execution.kubernetes.schedule_job#
- runtraj.execution.kubernetes.schedule_job(project, execution, *, delay=8)[source]#
Make the CronJob that runs a project every hour, for the sites in its
sites.csv, and return its name.Each hour its pod runs
runtraj tick(runtraj.execution.schedule). Withinputsset, the project’s inputs are copied there first,sites.csvwith them;releases.csvonly while the bucket has none, since each hour’s pod adds to the copy there and a push would write over those hours. A project needs noreleases.csvto start: its first tick makes one. Withoutinputsthe pods open the project folder at its path here, on a volume they mount. The manifest is written to_kubernetes/<date_time>_<id>/cronjob.yamlin the project, and the CronJob’s name tocronjob.namebeside it. Scheduling the project again replaces its CronJob.- Raises:
FileNotFoundError – If the project has no
sites.csv.ValueError – If
sites.csvcannot be read, or the pods would lose their results (assubmit_job()).
- Return type:
- Parameters:
project (runtraj.Project)
execution (ExecutionConfig)
delay (int)