Jobs
A job is a piece of work this system carries out by itself, at a fixed cadence and without anybody pressing a button. These are the tasks nobody wants to do by hand and that still have to be done regularly: compacting old recordings, clearing out expired entries, rolling forward figures, tidying up operations that got stuck.
Jobs are not created here. They come from the program — every job belongs to a service that brings it along. What can be set here is when a job runs, how often it retries after a failure, and whether it runs at all.
The list shows, per job, the state, the function, the description, the schedule and the last and next run. "Next run: Never" on an enabled job means the schedule falls on no point in the foreseeable future — usually a cron expression that was not meant that way.
Schedule
The schedule is a cron expression in the six-field notation used by the TickerQ scheduler. Six fields separated by spaces, in this order:
second minute hour day month weekday
0 */5 * * * *
The first field is the second. That is the difference from the five-field notation familiar from Unix cron, and the most common source of error: a five-field expression entered here shifts every field by one place and makes a job that was meant to run hourly run every minute.
| Expression | When |
|---|---|
0 */5 * * * * | every five minutes, on the full second |
0 0 * * * * | hourly, on the hour |
0 30 2 * * * | daily at 02:30 |
0 0 3 * * 0 | Sundays at 03:00 |
*/30 * * * * * | every thirty seconds |
The time zone is the server's, not the browser's. For a daily job at 02:30 it is worth a thought about daylight saving: on the night the clocks go back that time exists twice, on the night they go forward it may not exist at all.
The remaining fields
- Description — free text that appears in the list. For the reader it stands in for the function name, which comes from the program and does not always explain what the job does.
- Retries on failure — how often a failed run is attempted again before it counts as finally failed. Every attempt appears as a row of its own in the log.
- Job is enabled — a disabled job does not run at all, neither on schedule nor after the fact. Disabling means suspending, not deferring: the missed runs are not made up when it is switched back on.
A job can also bring a settings section along. It then has a tab of its own with the settings that steer its behaviour — retention periods, batch sizes, time limits. How that section is operated is described under settings.
Run now
"Run now" queues a run at once, on top of the schedule. The schedule does not shift because of it; the next regular run comes at its own time as usual.
If the job is running at that moment, the run in progress is not aborted. The queued run takes its turn afterwards — or is skipped, depending on how the job handles overlap.
Log
The log carries every recorded run of this job, newest first, with its due time, actual start, duration, attempt number, executing instance and message.
It expressly also carries the runs where nothing happened. Those are of two kinds, and both belong there:
- Skipped. The moment was due but the run did not take place — because the previous one was still running, because a precondition was missing, or because the job was disabled at that point. The "Message" column names the reason. A job that is regularly skipped is one whose cadence is set tighter than its runtime.
- Taken over by another instance. If the system runs as several replicas, one of them executes the job and the others do not. Which one is decided per run; the "Instance" column names it. From a single replica's point of view this looks like a run that failed to happen, but it is the exact opposite: the coordination worked, and one job ran once instead of three times.
Were these rows not in the log, a gap would appear that could not be told apart from an outage. That is precisely why they are in it.
A job that has never run has an empty log. On a freshly set-up system that is normal; on one that has been running for a while it is a hint that the job is disabled or that its schedule does not bite.