Feature: My Jobs - EyevinnOSC/community GitHub Wiki
My Jobs is a feature in OSC that lets you create and schedule background Python jobs that run on a cron schedule. Instead of managing your own infrastructure, OSC provisions an ephemeral job runner for each execution and cleans it up automatically when the job completes.
- Create scheduled background jobs from a Git repository (including private OSC Gitea repos)
- Set any cron expression as the schedule
- Trigger a job immediately with a single API call
- Suspend a job without deleting it, and resume it later
- Bind a parameter store to a job so its contents are injected as environment variables at runtime
- An OSC account on a paid plan (Personal, Professional, or Business)
- A Personal Access Token (PAT) for authentication — create one at app.osaas.io/dashboard/tokens
- A Python job in a Git repository (public or OSC Gitea)
My Jobs is accessible from the top-level Jobs tab in the My Apps section:
- Navigate to My Apps in the OSC dashboard
- Click the Jobs tab (alongside the Apps tab)
- All scheduled jobs across your workspace are listed here, regardless of which app they belong to
- Click Create job to add a new scheduled job. The create form includes a Parameter store selector (optional) — choose an existing parameter store instance to inject its values as environment variables when the job runs. Use the action buttons to run, suspend, or delete an existing job.
- To modify an existing job, click the pencil icon next to it. The edit modal lets you update the cron schedule, source URL, worker command, and parameter store binding without deleting and recreating the job.
When a scheduled job is due, deploy-manager spins up an ephemeral eyevinn-python-job-runner instance, passes your source URL and worker command, and tears it down after execution. Credentials for private OSC Gitea repositories are resolved at trigger time — they are never stored in the job definition.
All endpoints require a PAT passed as Authorization: Bearer <pat> in the x-pat-jwt header.
Base URL: https://deploy.svc.prod.osaas.io
curl -s -H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobscurl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "dailysync",
"cronSchedule": "0 9 * * 1-5",
"sourceUrl": "https://github.com/myorg/myrepo",
"workerCmd": "python jobs/sync.py",
"configService": "my-param-store"
}' \
https://deploy.svc.prod.osaas.io/myjobs| Field | Required | Description |
|---|---|---|
name |
Yes | Alphanumeric identifier (no hyphens or underscores) |
cronSchedule |
Yes | Standard 5-field cron expression (e.g. 0 9 * * 1-5) |
sourceUrl |
Yes | URL of the Git repository containing your Python script |
workerCmd |
No | Command to run (defaults to the runner's built-in entrypoint) |
configService |
No | Name of a Parameter Store service instance whose values are injected as environment variables at runtime |
configApiKey |
No | API key for the parameter store. Required only if the store was set up with encryption (encrypted secrets); leave blank for plain parameter stores |
curl -s -H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysynccurl -s -X PATCH \
-H "x-pat-jwt: Bearer $PAT" \
-H "Content-Type: application/json" \
-d '{
"cronSchedule": "0 8 * * 1-5",
"sourceUrl": "https://github.com/myorg/new-repo",
"workerCmd": "python jobs/new_entry.py",
"configService": "my-param-store",
"configApiKey": "new-key"
}' \
https://deploy.svc.prod.osaas.io/myjobs/dailysyncOnly the fields you include in the body are changed. Send "configService": null or "configApiKey": null to clear those fields. Omit a field entirely to leave it unchanged.
curl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/runThe response is returned immediately (HTTP 201) once the job runner is started. OSC polls the runner in the background and updates lastRunStatus to success or failed once the job completes — the same behavior as a scheduled run. Poll GET /myjobs/dailysync to check the outcome.
curl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/suspendcurl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/resumecurl -s -X DELETE \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync| Field | Type | Description |
|---|---|---|
name |
string | Job name |
tenantId |
string | Your workspace ID |
runtime |
string | The job runtime (e.g. python-job) |
cronSchedule |
string | The cron expression |
sourceUrl |
string | Git repository URL |
workerCmd |
string | Worker command (if set) |
configService |
string | Name of the bound parameter store instance (if set) |
enabled |
boolean | Whether the job is active |
lastRunAt |
number | Unix timestamp of the last run (or null) |
lastRunStatus |
string | Status of the last run (or null) |
createdAt |
string | ISO 8601 creation timestamp |
updatedAt |
string | ISO 8601 last-update timestamp |