Scheduled jobs
Run commands on connected or managed servers, with schedules, retries, logs and notifications.
Jobs run commands on your servers, on a schedule, once, on demand, or after an event. Find them under Jobs in self-hosted GramCode and GramCode Cloud.
Every run is recorded — when it last ran, whether it succeeded, how long it took, and its output.
Built-in jobs
Self-hosted installations also show the system jobs GramCode runs for you. Cloud maintenance is managed privately by the platform; Cloud customers see their own command jobs and authorized backup schedules.
| Job | What it does | Default schedule |
|---|---|---|
| SSL certificate renewal | Renews Let's Encrypt certificates before they expire | daily |
| Orphaned resource cleanup | Reclaims leftovers from a failed teardown | hourly |
| Backup retention prune | Deletes backups past their retention window | daily |
| Audit log prune | Trims old audit entries per your retention setting | daily |
| Deployment reconcile | Settles deploys interrupted by a connection blip | every 10 min |
An instance administrator can change the schedule, enable/disable it, Run now, and see its run history. You can't delete a built-in job (it's part of GramCode) — disable it instead.
Your own jobs
Need a nightly database dump, a cache warm, or a cleanup script? Create a custom job:
- In Jobs, click New job.
- Give it a name, pick the server it runs on, enter the command, and a schedule (cron).
- Save. It runs on that schedule, and you can Run now any time.
While a job runs you can watch its live output, and every run is kept in history with its result.
Choosing a Cloud server
Select an existing managed server to share its resources with your projects, or click Add a dedicated server to create a server with its own subscription. The same job form supports both. You can also select several servers to run the command on each one.
Jobs use the selected server's capacity and usage allowance. The server must be running and its subscription and balance must allow new work. A job does not provision or resume a server automatically. Run now opens the server's plan options if billing prevents execution; scheduled attempts record the failure in run history. Provision or resume a paid server from Servers when needed.
Commands execute on the server itself. To run a temporary container task, use
docker run --rm <image> <command> on a server with Docker available. Jobs have
the server's command privileges, so configuring or reading a job requires
administration access to all its targets as well as Jobs permissions.
Schedules (cron), in plain terms
A schedule is a standard 5-field cron string:
┌───────── minute (0–59)
│ ┌─────── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌─── month (1–12)
│ │ │ │ ┌─ day of week (0–6, Sun=0)
* * * * *| Cron | When |
|---|---|
0 3 * * * | every day at 03:00 |
*/15 * * * * | every 15 minutes |
0 * * * * | every hour, on the hour |
0 2 * * 0 | every Sunday at 02:00 |
30 4 1 * * | 04:30 on the 1st of each month |
GramCode validates the cron when you save and shows the next run time.
Run now is recorded too
Triggering a job manually with Run now is saved in history just like a scheduled run, marked as manual — so you always have a full record.
CLI
Use openship job (alias jobs) with your Cloud or self-hosted connection context:
openship job list
openship job create --name weekly-sync --server <server-id> \
--command 'cd /srv/app && npm run db:sync' --cron '17 4 * * 1'
openship job get <key>
openship job update <key> --no-enabled
openship job update <key> --enabled --cron '0 3 * * *'
openship job run <key> --follow
openship job runs <key> --limit 10
openship job logs <run-id> --follow
openship job delete <key> --yesJobs also work with openship --native-config <file> job ... through the native SDK.
Use the job key from list or create, not its database ID. For a one-time
job, pass --schedule once --at <ISO-timestamp>. For manual execution only, pass
--schedule manual. Recurring jobs use --cron.
Both create and update accept --file <path> containing a JSON Jobs API body.
Use it for env, secrets, serverIds, retry, timeoutMs, dependsOn,
triggerEvents, or notifyConfig, or to supply the entire job configuration.
Explicit flags override file values. Updates send only supplied fields. Keep
files containing secrets private. The API encrypts secrets at rest.
--json returns API data without the envelope. Followed runs emit JSON events.
Without --follow, run returns a custom run ID immediately. With --follow,
the CLI waits for the outcome and exits nonzero on failure or an interrupted
stream. Built-in jobs return their summary directly. logs without --follow
shows stored output, or the full run record with --json.
Logs & monitoring
See what your app is doing — its runtime logs, its incoming web requests, and its traffic — and know exactly where to look when something breaks.
Backups & restore
Keep safe copies of your app's data, back it up on a schedule, and roll it back when something goes wrong — from the dashboard or the terminal.