# What are cron jobs without a server?

> Cron without a server means a managed scheduler starts your script on a hosted runtime. You keep the schedule and the code; you no longer own the machine, updates, logs, secrets, and retries.

## The problem

Cron looks simple: five fields and a command. The hard part starts after the
expression. A crontab only runs while the machine is on, the clock is right,
the environment matches, and someone notices when it stops.

“Without a server” can mean several different things. It can mean a managed VM
you still administer, a cloud scheduler that invokes a function, or a hosted
runtime where the machine is no longer part of your job. Each option moves the
ownership somewhere else. The useful question is not whether there is a server.
It is who owns the schedule, the execution, the state, the credentials, and the
failure history.

## The usual options

| Option | What you still own | Best fit |
| --- | --- | --- |
| Cron on a VPS | The machine, OS updates, logs, secrets, monitoring, and backups | You already run a server and want full control |
| GitHub Actions schedules | The workflow, runner limits, repository configuration, and CI secrets | The job belongs next to a repository |
| A cloud scheduler and function | The cloud account, permissions, packaging, deployment, logs, and a state store | You want managed execution inside a cloud account |
| A hosted automation runtime | The script and the behavior you want | You want scheduling, execution, state, secrets, and history together |
| A custom scheduler service | Everything, plus the new service itself | The scheduler is part of a larger product |

Moving off a machine does not remove cron behavior. Schedules run in a
timezone, and daylight saving changes can shift local times. Runs can start
late. A run that is still going when the next one is due needs a rule: skip,
queue, or allow overlap. Retries need scripts that are safe to run twice.
Whichever option you choose, check that it states those rules.

## How GearTrain solves it

GearTrain keeps the schedule and moves the supporting pieces into one runtime:

- Write a JavaScript script and attach a five- or six-field cron expression.
- Cron is evaluated in your account timezone.
- The free plan can run a job at most every 15 minutes. Pro, when available,
  allows schedules as often as every minute.
- A scheduled run does not overlap itself. If the previous run or its retry is
  still in progress, the next occurrence is skipped.
- A failed scheduled run is retried with a short backoff. Attempts range from 1
  to 5 and default to 3, and every attempt counts as a run.
- Files persist between runs in the account file system.
- Secrets are stored once and read by name, not pasted into the script.
- The console and run history show the actual start time, retries, and failures.
- If more runs come due than the plan allows, extra runs wait rather than being
  dropped.

To move an existing cron job from a server you own, keep the same cron
expression and copy the command’s code into a job script. Anything the command
read from that server has to exist in GearTrain too: store credentials as
secrets and put required files in the account file system.

## What it looks like in practice

A crontab entry like this:

```text
0 2 * * * /usr/bin/node /srv/reports/nightly.js
```

becomes a job with the schedule `0 2 * * *` and the script
`/reports/nightly.js`. You can hand the conversion to an agent:

```text
Create a job called Nightly report that runs /reports/nightly.js on the
schedule 0 2 * * *. Run it once, read the console, and tell me what happened.
```

The outcome is a job with the schedule, a first run, a saved console, and a next
run time. The scheduled runs continue without the agent.

## When GearTrain is not the right fit

- You need sub-minute schedules.
- The process must stay running and keep a connection open.
- The job needs system-level access, a full browser, packages, or heavy compute.
- You need full control of the host, kernel, or network.
- The work is system maintenance rather than a script with a clear outcome.

Keep cron on the machine when the work is part of the machine. Use a server or
a container platform for persistent processes, and a dedicated queue when the
work is a high-volume stream.

## Related solutions

- [How do I run a script on a schedule without running a server?](https://geartrain.dev/solutions/run-a-script-on-a-schedule-without-a-server)
- [How do I monitor a web page and get a Slack alert without a server?](https://geartrain.dev/solutions/monitor-a-web-page-and-get-a-slack-alert)
- [How do I choose the right automation tool?](https://geartrain.dev/solutions/choose-the-right-automation-tool)

## Documentation

- [Writing Jobs](https://docs.geartrain.dev/guide/writing-jobs)
- [Run a Job on a Schedule](https://docs.geartrain.dev/examples/run-job-on-a-schedule)
- [Best Practices](https://docs.geartrain.dev/guide/best-practices)

## Start

- [Start free](https://app.geartrain.dev/signup)
