-
Notifications
You must be signed in to change notification settings - Fork 1
Feature: My Jobs
Claude Agent edited this page Jul 7, 2026
·
1 revision
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
- Pass environment variables to jobs at creation time
- 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)
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",
"envVars": {
"API_URL": "https://api.example.com"
}
}' \
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) |
envVars |
No | Key-value pairs injected as environment variables at runtime |
curl -s -H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysynccurl -s -X POST \
-H "x-pat-jwt: Bearer $PAT" \
https://deploy.svc.prod.osaas.io/myjobs/dailysync/runcurl -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 | Always python-job
|
cronSchedule |
string | The cron expression |
sourceUrl |
string | Git repository URL |
workerCmd |
string | Worker command (if set) |
envVars |
object | Environment variables (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 |