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). With inputs set, the project’s inputs are copied there first, sites.csv with them; releases.csv only 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 no releases.csv to start: its first tick makes one. Without inputs the pods open the project folder at its path here, on a volume they mount. The manifest is written to _kubernetes/<date_time>_<id>/cronjob.yaml in the project, and the CronJob’s name to cronjob.name beside it. Scheduling the project again replaces its CronJob.

Raises:
Return type:

str

Parameters: