Skip to content

Long-running jobs

A run has no time limit, and instead one email arrives after eight hours; the threshold is per job and zero switches it off.

No limit

Runjet never stops a run for taking too long. It cannot see what the command is doing — that is running on your machine — and a scheduler that kills a customer's backup at an hour it chose itself has caused the outage instead of reporting one. How long the work should take is your decision, not ours.

What does end a run: the command finishing; the agent shutting down, which kills the process and reports the run as failed (killed by agent shutdown); and resetting an agent, after which it has nothing to report with. None of these is a clock.

A sentence instead of a limit

Past the threshold, one email goes to the workspace's admins and operators: the job has been running on this agent for this long, that is past the threshold you asked to hear about, it is still running, and Runjet has not stopped it. The default threshold is eight hours — a working day. Below it are the jobs people call long and mean it: an overnight export, a full backup, a rebuild. Above it, "still running" stops describing the work and becomes a question about it.

The mail carries a second thing with it: while the run lasts it holds its job's slot on that agent, so the next occurrence will not start there.

The threshold, per job

The Email me if a run takes too long switch on the job form, and the hours beside it:

  • the default number left alone means "I have no opinion" — the job follows Runjet's own default threshold, even when that one day changes,
  • another number (1 to 8,760 hours) is this job's threshold,
  • the switch off means zero: this job is not worth a message, however long it takes.

The Email me when this job fails switch above it is the master one. Off, it silences every message about the job, this one included; the form says so.

Once, and never twice

At most one mail arrives about one run. The sweep that checks thresholds passes every thirty seconds, and a nine-hour run is over the line on every one of them — the difference between one message and a thousand is that Runjet records the sending against the run in the same step that decides on it. Nothing ever clears that mark: a run ends or it does not, and unlike a failure, which is followed by a "working again", there is no second half here to send.

Who does not get the mail: a workspace with no admins and no operators has nobody to write to, and Runjet finds that out before it records the sending — because nothing here fixes itself, and a single opportunity wasted would be wasted for good.