Temporal Set Theory & POSIX Cron Execution Formulations
Cron scheduling daemons evaluate predicate constraints over discrete timestamps:
1. Cron Timestamp Predicate Evaluation Equation
T_{exec} = { t \in \text{Time} \mid t_{min} \in M \land t_{hr} \in H \land (t_{dom} \in D_{dom} \lor t_{dow} \in D_{dow}) \land t_{mo} \in \text{Mo} }
2. Step-Interval Modulo Formula
k \in [0, N-1] \iff (k \pmod s) = 0
Step-by-Step Cron Expression Evaluation Breakdown
Step 1: 5-Field Lexical Tokenization
Split string into [Minute, Hour, DOM, Month, DOW] tokens.
Step 2: Step & Range Expansion
Expand
*/15 to {0, 15, 30, 45} and 1-5 to Mon through Fri.Step 3: Natural Language Synthesis
Translation=Unambiguous Human-Readable Schedule
Cron Field Index & Special Characters Reference
| Field | Allowed Range | Special Characters | Example Meaning |
|---|---|---|---|
| 1. Minute | 0 – 59 | * , - / | */10 = Every 10 minutes |
| 2. Hour | 0 – 23 | * , - / | 9-17 = Working hours |
| 3. Day of Month | 1 – 31 | * , - / ? L | 1,15 = Bi-monthly payroll |
| 4. Month | 1 – 12 or JAN-DEC | * , - / | */3 = Quarterly |
| 5. Day of Week | 0 – 6 (0=Sun) | * , - / ? | 1-5 = Mon through Fri |