Cron Presets
Eight well-known cron nickname strings (@yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly, @reboot) paired with their canonical five-field cron expressions and plain-English descriptions. These aliases are supported by Vixie cron and its descendants (cronie, the Debian/Ubuntu cron) and by many other cron implementations and libraries; systemd timers use similar but not identical shorthands without the @ (e.g. OnCalendar=weekly means Monday 00:00).
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/cron-presets.json
Or use as a typed import:
import { cronPresets } from "https://staticdata.dev/v1/cron-presets.ts"
Formats
- JSON 1.1 KB
/v1/cron-presets.json
min: 965 B · /v1/cron-presets.min.json
- CSV 658 B
/v1/cron-presets.csv
- TypeScript 1.3 KB
/v1/cron-presets.ts
export const cronPresets
type CronPreset = (typeof cronPresets)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| alias | string | Special-string nickname recognized by cron (e.g. @daily) | @daily |
| expression | string | Equivalent five-field cron expression, or @reboot for the startup preset | 0 0 * * * |
| description | string | Human-readable explanation of when the job runs | Run once a day at midnight. |
Preview
First 8 records.
| alias | expression | description |
|---|---|---|
| @yearly | 0 0 1 1 * | Run once a year at midnight on January 1st. Equivalent to @annually. |
| @annually | 0 0 1 1 * | Run once a year at midnight on January 1st. Equivalent to @yearly. |
| @monthly | 0 0 1 * * | Run once a month at midnight on the first day of the month. |
| @weekly | 0 0 * * 0 | Run once a week at midnight on Sunday. |
| @daily | 0 0 * * * | Run once a day at midnight. Equivalent to @midnight. |
| @midnight | 0 0 * * * | Run once a day at midnight. Equivalent to @daily. |
| @hourly | 0 * * * * | Run once an hour at the beginning of the hour. |
| @reboot | @reboot | Run once at startup (when the cron daemon starts). Not a standard five-field expression. |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/cron-presets.json | jq '.[0]' import type { CronPreset } from "https://staticdata.dev/v1/cron-presets.ts";
const res = await fetch("https://staticdata.dev/v1/cron-presets.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const cronPresets: CronPreset[] = await res.json();
console.log(cronPresets[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/cron-presets.min.json") as r:
cronPresets = json.load(r)
print(cronPresets[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/cron-presets.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/cron-presets.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
This dataset was curated from the crontab(5) man page of Vixie cron and its descendant cronie, which first introduced the @-prefixed special strings as a convenience layer over the standard five-field syntax. The eight entries represent the complete, canonical set: @yearly and @annually are interchangeable aliases for January 1st at midnight; @monthly runs on the first of each month; @weekly runs every Sunday at midnight; @daily and @midnight are interchangeable aliases for midnight every day; @hourly fires at the top of every hour; and @reboot runs once when the cron daemon starts.
The @reboot entry is intentionally kept as a literal @reboot string in the expression field because it has no equivalent five-field representation — it is a scheduler-level directive, not a time-based schedule. Consumers that only accept standard five-field expressions should treat @reboot as a special case.
Both @yearly/@annually and @daily/@midnight pairs resolve to identical five-field expressions (0 0 1 1 * and 0 0 * * * respectively). They are included as separate records because both spellings appear in real crontab files and documentation, and a lookup table covering all recognized aliases should map each one explicitly.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
cron-presets changelog for this dataset's history.
More Code datasets
- ansi-colors
- ascii
- css-at-rules
- css-functions
- css-named-colors
- css-properties
- css-pseudo-classes
- css-pseudo-elements
- css-units
- data-units
- exit-codes
- file-signatures
- hash-algorithms
- js-array-methods
- js-math-methods
- js-object-methods
- js-string-methods
- json-schema-keywords
- jwt-claims
- mathematical-constants
- measurement-units
- node-builtin-modules
- owasp-top-10
- periodic-table
- physical-constants
- posix-signals
- programming-languages
- regex-flags
- regex-patterns
- roman-numerals
- si-base-units
- si-derived-units
- si-prefixes
- spdx-licenses
- strftime-tokens
- tailwind-colors
- time-units
- unicode-blocks
- unicode-general-categories
- unicode-planes
- unix-file-permissions
- xterm-256-colors