My Jobs
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.
What You Can Do
- 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
Prerequisites
- 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)
Using the Web Console
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.
How It Works
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.
API Reference
All endpoints require a PAT passed as Authorization: Bearer <pat> in the x-pat-jwt header.
Base URL: https://deploy.svc.prod.osaas.io
List jobs
curl -s -H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs
Create a job
curl -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 |
Get a job
curl -s -H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync
Trigger an immediate run
curl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/run
Suspend a job (disable without deleting)
curl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/suspend
Resume a suspended job
curl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/resume
Delete a job
curl -s -X DELETE \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync
Job Response Fields
| 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 |