Skip to main content

Cron Cheatsheet — 80+ Syntax, Expressions, Special Strings, and Crontab Tips

Cron cheat sheet — 80+ entries covering syntax, time expressions, special strings, environment variables, crontab management, and common pitfalls.

  • Runs locally
  • Category Developer & DevOps
  • Best for Formatting, validating, shrinking, or inspecting code-adjacent text.
Section:
80 entries
Syntax & Operators (13)
* * * * * command

The five-field cron format: minute hour day-of-month month day-of-week command. Each asterisk means "every possible value" for that field.

Examples
# ┌─── minute (0-59)
# │ ┌─── hour (0-23)
# │ │ ┌─── day of month (1-31)
# │ │ │ ┌─── month (1-12)
# │ │ │ │ ┌─── day of week (0-7, 0 and 7 = Sunday)
# │ │ │ │ │
# * * * * *  /path/to/command
minute (0–59)

The minute field accepts integers 0–59. `0` means "at the top of the hour"; `30` means "at the half-hour mark".

Examples
0 * * * *  /run/hourly.sh   # at :00 every hour
30 * * * * /run/half.sh     # at :30 every hour
hour (0–23)

The hour field uses 24-hour format: 0 = midnight, 12 = noon, 17 = 5 pm, 23 = 11 pm. No AM/PM notation.

Examples
0 0  * * * cmd   # midnight
0 12 * * * cmd   # noon
0 17 * * * cmd   # 5 pm
day-of-month (1–31)

Day of the month, 1–31. Not all months have 31 days; cron will simply not run on days that do not exist (e.g. Feb 30 never fires).

Examples
0 0 1  * * /monthly-start.sh   # first of month
0 0 15 * * /mid-month.sh       # 15th of month
month (1–12)

Month field: 1 = January, 12 = December. Most cron implementations also accept three-letter abbreviations (Jan, Feb, Mar…).

Examples
0 0 1 1   * /new-year.sh   # January 1st
0 0 1 Jun * /mid-year.sh   # June 1st
day-of-week (0–7)

Day of week: 0 and 7 both mean Sunday, 1 = Monday, …, 6 = Saturday. Most cron implementations also accept abbreviations (Sun, Mon, Tue…).

Gotcha: Both 0 and 7 mean Sunday — a common off-by-one trap coming from languages where weekdays are 0–6. Stick to 0–6 for clarity.

Examples
0 0 * * 0 /sunday.sh   # Sunday
0 0 * * 1 /monday.sh   # Monday
0 0 * * 5 /friday.sh   # Friday
*

Wildcard: matches every valid value for the field. `* * * * *` means "every minute of every hour of every day".

Examples
* * * * * /every-minute.sh
* * * * 1-5 /weekday-minutes.sh
1,15,30

Comma-separated list: run at each value in the list. `1,15,30` in the minute field runs at minutes 1, 15, and 30 of every hour.

Examples
0 6,12,18 * * * /three-times.sh   # 6 am, noon, 6 pm
0,30 * * * *    /every-half.sh
1-5

Dash range: matches all integers from 1 to 5 inclusive. `1-5` in the day-of-week field means Monday through Friday.

Examples
0 9 * * 1-5 /weekday.sh   # Mon–Fri at 9 am
0 8-18 * * * /work-hrs.sh
*/5

Step value: run every N units starting from the lowest value. `*/5` in the minute field means 0, 5, 10, 15, …, 55. Equivalent to `0-59/5`.

Examples
*/5  * * * * /every-5-min.sh
*/15 * * * * /every-quarter.sh
*/30 * * * * /every-half.sh
0-30/10

Range combined with step: matches values in the range at every Nth step. `0-30/10` matches 0, 10, 20, 30 — the first half of the hour at 10-minute intervals.

Examples
0-30/10 * * * * /cmd.sh   # at :00, :10, :20, :30 of every hour
# comment

Lines starting with `#` are comments and are ignored by the cron daemon. Use them to document what each job does.

Examples
# Daily database backup
0 2 * * * /usr/local/bin/backup-db.sh
# Hourly cache purge
0 * * * * /usr/local/bin/clear-cache.sh
0 * * * *

Field position reminder: the first `0` is the minute field, the lone `*` is the hour field. This means "at minute 0 of every hour" — i.e., once per hour, on the hour.

Examples
0 * * * * /usr/local/bin/hourly-check.sh
Time Expressions (30)
* * * * *

Every minute, every hour, every day. The most frequent standard cron schedule — fires 1,440 times per day.

Examples
* * * * * /health-check.sh
*/2 * * * *

Every 2 minutes.

Examples
*/2 * * * * /poll-queue.sh
*/5 * * * *

Every 5 minutes. One of the most common production schedules for lightweight polling jobs.

Examples
*/5 * * * * /check-status.sh
*/10 * * * *

Every 10 minutes.

Examples
*/10 * * * * /sync-data.sh
*/15 * * * *

Every 15 minutes (quarter-hour).

Examples
*/15 * * * * /refresh-cache.sh
*/30 * * * *

Every 30 minutes (twice per hour). Runs at :00 and :30 of every hour.

Examples
*/30 * * * * /half-hourly.sh
0 * * * *

Once per hour, at minute 0 (the top of the hour).

Examples
0 * * * * /hourly-report.sh
30 * * * *

Once per hour, at minute 30 (the half-hour mark).

Examples
30 * * * * /half-past.sh
0 */2 * * *

Every 2 hours, on the hour. Runs at 00:00, 02:00, 04:00, …, 22:00.

Examples
0 */2 * * * /every-2-hours.sh
0 */4 * * *

Every 4 hours. Runs at 00:00, 04:00, 08:00, 12:00, 16:00, 20:00.

Examples
0 */4 * * * /every-4-hours.sh
0 */6 * * *

Every 6 hours. Runs at midnight, 6 am, noon, and 6 pm.

Examples
0 */6 * * * /6-hourly.sh
0 0,12 * * *

Twice a day: midnight and noon.

Examples
0 0,12 * * * /twice-daily.sh
0 8,12,17 * * *

Three times a day: at 8 am, noon, and 5 pm.

Examples
0 8,12,17 * * * /three-times-daily.sh
0 0 * * *

Once a day at midnight (00:00). The most common daily job pattern.

Examples
0 0 * * * /daily-cleanup.sh
0 2 * * *

Once a day at 2 am. Popular for nightly backups — late enough to miss peak traffic, early enough to finish before business hours.

Examples
0 2 * * * /backup-db.sh
0 9 * * *

Once a day at 9 am.

Examples
0 9 * * * /morning-report.sh
0 12 * * *

Once a day at noon (12:00).

Examples
0 12 * * * /noon-digest.sh
0 9 * * 1-5

Every weekday (Monday through Friday) at 9 am. Weekends are skipped entirely.

Examples
0 9 * * 1-5 /standup-reminder.sh
0 9-17 * * 1-5

Every hour during business hours, Monday through Friday. Runs at 9:00, 10:00, …, 17:00 on weekdays only.

Examples
0 9-17 * * 1-5 /business-hours-check.sh
0 22 * * 1-5

Weeknights at 10 pm — after business hours but before midnight; a common time for nightly builds.

Examples
0 22 * * 1-5 /nightly-build.sh
0 0 * * 0

Every Sunday at midnight. Classic weekly maintenance window.

Examples
0 0 * * 0 /weekly-report.sh
0 0 * * 1

Every Monday at midnight — start-of-week reset tasks.

Examples
0 0 * * 1 /weekly-reset.sh
0 0 * * 5

Every Friday at midnight — end-of-week reporting tasks.

Examples
0 0 * * 5 /weekly-digest.sh
0 0 * * 6,0

Every weekend (Saturday and Sunday) at midnight.

Examples
0 0 * * 6,0 /weekend-task.sh
5 4 * * 0

Every Sunday at 4:05 am. The canonical "weekly cron" example from many Linux distributions — offset by 5 minutes to avoid all-at-once stampedes on the hour.

Examples
5 4 * * 0 /weekly-maintenance.sh
0 0 1 * *

First day of every month at midnight.

Examples
0 0 1 * * /monthly-invoice.sh
0 0 1,15 * *

First and fifteenth of every month at midnight — a common billing cycle.

Examples
0 0 1,15 * * /bimonthly-report.sh
0 0 1 */3 *

Once a quarter: first day of January, April, July, and October at midnight.

Examples
0 0 1 */3 * /quarterly-audit.sh
0 0 1 1 *

Once a year on January 1st at midnight. Use @yearly for a more readable equivalent.

Examples
0 0 1 1 * /annual-report.sh
0 0 28-31 * *

Days 28–31 of every month. NOT a reliable "last day of month" — on a 28-day February this runs only on the 28th, while on a 31-day month it runs four times.

Gotcha: There is no portable "last day of month" syntax in standard cron. Use a wrapper: `[[ $(date -d tomorrow +%d) == 01 ]] && /path/cmd`.

Examples
0 0 28-31 * * /maybe-end-of-month.sh
Special Strings (6)
@reboot command

Run the command once, immediately after the cron daemon starts (usually at system boot). Useful for starting user-level services that should survive reboots.

Gotcha: @reboot jobs run when crond starts, not at a specific boot phase. Services needing the network or mounts to be ready may fail — add a `sleep 10` guard or use systemd instead.

Examples
@reboot /home/user/start-app.sh
@reboot sleep 10 && /usr/local/bin/myservice
@hourly command

Run once an hour at the beginning of the hour. Equivalent to `0 * * * * command`.

Examples
@hourly /usr/local/bin/clear-tmp.sh
@daily / @midnight

Run once a day at midnight (00:00). `@midnight` is an alias for `@daily`. Equivalent to `0 0 * * * command`.

Examples
@daily    /usr/local/bin/rotate-logs.sh
@midnight /usr/local/bin/daily-backup.sh
@weekly command

Run once a week on Sunday at midnight. Equivalent to `0 0 * * 0 command`.

Examples
@weekly /usr/local/bin/weekly-report.sh
@monthly command

Run once a month on the first day of the month at midnight. Equivalent to `0 0 1 * * command`.

Examples
@monthly /usr/local/bin/monthly-invoice.sh
@yearly / @annually

Run once a year on January 1st at midnight. Both strings are equivalent to `0 0 1 1 * command`.

Examples
@yearly   /usr/local/bin/archive-data.sh
@annually /usr/local/bin/annual-cleanup.sh
Environment (8)
SHELL=/bin/bash

Set the shell cron uses to execute commands. Default is usually `/bin/sh`. Set to `/bin/bash` if you use bash-specific syntax in your commands.

Examples
SHELL=/bin/bash
0 * * * * [[ -f /tmp/flag ]] && echo "found"
MAILTO=user@example.com

Send any output (stdout + stderr) from cron jobs to this email address. Requires a local mail agent (sendmail, postfix, ssmtp) configured on the system.

Examples
MAILTO=admin@example.com
0 2 * * * /backup.sh
MAILTO=""

Disable email output entirely. Any output from jobs is silently discarded. Use this when you redirect output to log files and do not want cron flooding your inbox.

Examples
MAILTO=""
0 * * * * /hourly.sh >> /var/log/hourly.log 2>&1
HOME=/home/username

Override the home directory for cron jobs. Affects `~` expansion and defaults for programs that reference $HOME.

Examples
HOME=/home/deploy
0 0 * * * ~/.local/bin/cleanup.sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Set a full PATH for all jobs in the crontab. The default cron PATH is very restricted — typically only `/usr/bin:/bin`. Add this line at the top to make all system commands available.

Gotcha: Setting PATH in the crontab does NOT source NVM, pyenv, or other version-manager shims. Source those explicitly in the command or a wrapper script.

Examples
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
0 * * * * node /app/cron.js
CRON_TZ=America/New_York

Set the timezone for all jobs in this crontab file. Jobs run relative to the specified timezone, regardless of the system timezone.

Gotcha: `CRON_TZ` is supported by Vixie cron and many derivatives. Some systems use `TZ` instead. Check your cron daemon's documentation.

Examples
CRON_TZ=America/New_York
0 9 * * * /send-nyc-report.sh
TZ=UTC

Alternative timezone variable supported by most cron implementations. Use `TZ=UTC` to ensure jobs always run in UTC regardless of the system locale.

Examples
TZ=UTC
0 0 * * * /midnight-utc.sh
. /etc/profile; . ~/.bashrc

Manually source login files at the start of a cron command. The cron environment is minimal and does NOT auto-source .bashrc, .profile, or .bash_profile.

Gotcha: Sourcing .bashrc inside a cron job can cause side effects (interactive-only code, aliases, prompts). Better: set specific env vars in the crontab header.

Examples
0 * * * * . /etc/profile; /path/to/script.sh
Crontab & Tools (13)
crontab -e

Open the current user's crontab in $EDITOR for editing. The new version replaces the old one atomically when you save and exit.

Examples
crontab -e
EDITOR=nano crontab -e   # use nano instead of vi
crontab -l

List (print to stdout) the current user's crontab without opening an editor.

Examples
crontab -l
crontab -l 2>/dev/null || echo "no crontab for $USER"
crontab -r

Remove (delete) the current user's entire crontab. There is NO confirmation prompt and NO undo. Use with extreme caution.

Gotcha: `crontab -r` wipes the crontab instantly with zero confirmation. Always `crontab -l > backup.cron` before running it, or use `crontab -e` to remove individual lines.

Examples
crontab -l > ~/crontab-backup-$(date +%Y%m%d).cron  # backup first!
crontab -r
sudo crontab -u username -e

Edit the crontab for another user (requires root or sudo). The `-u` flag specifies which user's crontab to edit.

Examples
sudo crontab -u deploy -e
sudo crontab -u deploy -l   # list deploy user's crontab
crontab -l > backup.cron

Backup the current crontab to a file. Restore it later with `crontab backup.cron` or `cat backup.cron | crontab -`.

Examples
crontab -l > ~/crontab-$(date +%Y%m%d).bak
cat ~/crontab-20240101.bak | crontab -   # restore
/etc/cron.d/

System-wide cron job directory. Files here must include a username field: `minute hour dom month dow USERNAME command`. Used by packages to install their own cron jobs.

Examples
# /etc/cron.d/myapp
0 2 * * * root     /usr/local/bin/myapp-backup.sh
*/5 * * * * www-data /var/www/myapp/cron.php
/etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/

Drop-in script directories managed by `run-parts`. Place executable scripts (no dot in filename) here and they run daily, weekly, or monthly via anacron or crond.

Gotcha: Scripts in /etc/cron.daily/ must be executable (`chmod +x`) and must NOT have a dot in the name (`backup.sh` is ignored; use `backup` or `backup_sh`).

Examples
chmod +x /etc/cron.daily/backup
run-parts --test /etc/cron.daily/   # dry run
flock -n /tmp/job.lock command

Run `command` only if the lock file is not already held by another instance. If a previous run is still in progress, this invocation exits immediately — preventing job pile-up.

Examples
*/5 * * * * flock -n /tmp/sync.lock /usr/local/bin/sync.sh
*/5 * * * * flock -n /tmp/job.lock -c "/path/to/long.sh >> /var/log/job.log 2>&1"
command >> /var/log/job.log 2>&1

Redirect stdout and stderr to a log file (append mode). Use this instead of relying on MAILTO for job output.

Examples
0 2 * * * /backup.sh >> /var/log/backup.log 2>&1
*/5 * * * * /poll.sh >> /var/log/poll.log 2>&1
command > /dev/null 2>&1

Suppress all output from a cron job — stdout and stderr both discarded. Use when you trust the job is correct and do not need a log.

Examples
*/5 * * * * /health-check.sh > /dev/null 2>&1
0 * * * * /cache-clear.sh >/dev/null 2>&1
date >> /tmp/cron-test.log 2>&1

Debug the cron environment. Add `env >> /tmp/cron-env.log` to also dump the full environment — compare PATH and vars to your interactive terminal.

Examples
* * * * * date >> /tmp/cron-test.log 2>&1
* * * * * env  >> /tmp/cron-env.log  2>&1
* * * * * which node >> /tmp/cron-path.log 2>&1
run-parts /path/to/scripts/

Run all executable scripts in a directory in alphabetical order. This is the mechanism cron uses for /etc/cron.daily/, /etc/cron.weekly/, etc.

Examples
0 2 * * *   run-parts /etc/cron.daily/
0 2 * * 0   run-parts --report /etc/cron.weekly/
systemctl status cron / systemctl status crond

Check if the cron daemon is running. Named `cron` on Debian/Ubuntu and `crond` on RHEL/CentOS/Fedora. Use `journalctl -u cron` to inspect recent logs.

Examples
systemctl status cron        # Debian/Ubuntu
systemctl status crond       # RHEL/CentOS
journalctl -u cron -n 50     # recent cron logs
Common Pitfalls (10)
Minimal PATH (command not found)

The cron daemon runs with a stripped-down PATH (usually only `/usr/bin:/bin`). Commands like `node`, `python`, `docker`, or custom scripts not in those dirs are not found. Fix: use absolute paths or set PATH at the top of the crontab.

Examples
# BAD: node is not in /usr/bin:/bin
0 * * * * node /app/cron.js
# GOOD: absolute path
0 * * * * /usr/local/bin/node /app/cron.js
# GOOD: set PATH at top of crontab
PATH=/usr/local/bin:/usr/bin:/bin
0 * * * * node /app/cron.js
% in commands (treated as newline)

An unescaped `%` in a cron command is treated as a newline character — everything after the first `%` is fed to the command as stdin. Escape literal percent signs as `\%`.

Examples
# BAD: % in date format treated as newline
0 0 * * * echo $(date +%Y-%m-%d) >> /tmp/log
# GOOD: escape % signs
0 0 * * * echo $(date +\%Y-\%m-\%d) >> /tmp/log
# BETTER: wrap in a script that handles the format
DOM + DOW = OR, not AND

If both day-of-month and day-of-week are set to non-`*` values, cron runs when EITHER condition is true (OR), NOT when both are true (AND). `0 0 1 * 5` runs on the 1st of every month AND every Friday.

Gotcha: This behavior is mandated by POSIX. Workaround: add a shell guard inside the command — `[ $(date +%u) -eq 5 ] && [ $(date +%d) -eq 01 ] && /cmd`.

Examples
# Runs on the 1st of every month AND on every Friday:
0 0 1 * 5 /cmd.sh
# Only on Fridays that are also the 1st:
0 0 1 * 5 [ "$(date +%u)" = "5" ] && /cmd.sh
No .bashrc / .profile sourced

Cron does NOT source `.bashrc`, `.bash_profile`, or `.profile`. Environment variables, shell functions, and aliases defined there are invisible to cron jobs. Export everything you need directly in the crontab header.

Examples
# In .bashrc (NOT visible to cron):
export NVM_DIR="$HOME/.nvm"
# In crontab (visible to cron):
NVM_DIR=/home/user/.nvm
0 * * * * /path/to/node-app.sh
crontab -r removes ALL jobs

`crontab -r` removes the ENTIRE crontab with no confirmation prompt. Many users accidentally run it thinking it removes one job. Always use `crontab -e` to delete individual lines.

Examples
# Always back up first:
crontab -l > ~/crontab-backup.txt
# Use crontab -e to remove specific jobs, NOT crontab -r
* 0 * * * vs 0 * * * *

`* 0 * * *` runs every minute for the entire midnight hour (00:00, 00:01, …, 00:59) — 60 executions. `0 * * * *` runs once an hour at :00. A common mistake when trying to write "once a day at midnight" (`0 0 * * *`).

Examples
* 0 * * * /cmd.sh   # runs 60 times between midnight and 1am!
0 0 * * * /cmd.sh   # once at midnight (correct)
0 * * * * /cmd.sh   # once an hour
Timezone surprises

Cron uses the system timezone by default. If the server runs in UTC and you expect local time, jobs run at unexpected hours. Set `CRON_TZ=` or `TZ=` in the crontab, or document the timezone assumption clearly.

Examples
# System TZ: UTC. Want to run at 9 am Beijing time (UTC+8):
0 1 * * * /morning.sh   # 01:00 UTC = 09:00 CST
# Cleaner with explicit TZ:
CRON_TZ=Asia/Shanghai
0 9 * * * /morning.sh
Script not executable

Cron silently fails (or sends a "Permission denied" email) if the script lacks execute permission. Always `chmod +x` your cron scripts and verify with `ls -l`.

Examples
chmod +x /usr/local/bin/my-cron-script.sh
ls -l /usr/local/bin/my-cron-script.sh   # verify -rwxr-xr-x
Relative paths fail in cron

Relative paths (e.g. `./script.sh` or `../data`) resolve relative to the working directory, which in cron is typically $HOME — not the script's location. Use absolute paths everywhere.

Examples
# BAD: relative path may not resolve correctly
0 * * * * ./scripts/cleanup.sh
# GOOD: absolute path
0 * * * * /home/user/scripts/cleanup.sh
Month is 1–12, not 0–11

In cron, months are 1-indexed (January = 1, December = 12), unlike JavaScript's `Date.getMonth()` which is 0-indexed. Setting month to `0` is invalid in most implementations.

Examples
# January 1st:
0 0 1 1 * /new-year.sh    # CORRECT (month 1)
0 0 1 0 * /new-year.sh    # WRONG  (month 0 is invalid)

What this tool does

Searchable cron cheat sheet with 80+ entries across six sections. Syntax: the five-field format, minute/hour/day/month/weekday field ranges, wildcard `*`, comma lists, dash ranges, and step intervals with `/`. Expressions: copy-ready patterns for every-minute, every-5-minutes, hourly, daily, weekly, monthly, weekdays-only, business-hours, and more. Special strings: `@reboot`, `@hourly`, `@daily`, `@midnight`, `@weekly`, `@monthly`, `@yearly` — the easy-read aliases supported by Vixie cron. Environment: `SHELL`, `MAILTO`, `HOME`, `PATH`, `CRON_TZ` / `TZ` and why the cron environment is intentionally minimal. Crontab management: `crontab -e`, `-l`, `-r`, system cron directories (`/etc/cron.d/`, `/etc/cron.daily/`), `run-parts`, and per-user crontabs. Advanced patterns: prevent overlapping jobs with `flock`, redirect output to a log file, suppress email noise, debug the cron environment, and send failure alerts. Pitfalls: PATH is almost empty, `%` is a newline in commands, DOM + DOW are OR not AND, no `.bashrc` is sourced, timezone traps, and more. Search, category chips, one-click copy — all in-browser.

Tool details

Input
Text + Structured content
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 50 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Developer & DevOps · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Cron Cheatsheet fits into your work

Use it in the small gaps between coding, reviewing, debugging, and shipping.

Developer jobs

  • Formatting, validating, shrinking, or inspecting code-adjacent text.
  • Preparing snippets for documentation, tickets, commits, or handoff.
  • Checking a small payload quickly without switching tools.

Developer checks

  • Run irreversible transforms like minify or obfuscate on a copy.
  • Keep secrets out of pasted snippets unless the tool explicitly stays local.
  • Use your normal tests or linter before shipping transformed code.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Bash Cheatsheet Bash cheat sheet — 100+ commands & idioms for variables, conditionals, loops, functions, pipes, traps, with real one-liners. Open
  2. 2 Loki Cheatsheet Grafana Loki cheat sheet — 80+ entries covering LogQL stream selectors, line filters, parsers, metric queries, aggregations, Promtail stages, Loki config, and HTTP API. Open
  3. 3 GitLab CI Cheatsheet GitLab CI/CD cheat sheet — 80+ entries covering pipeline structure, job config, rules, variables, artifacts, runners, templates, security, and the GitLab API. Open

Real-world use cases

  • Finding the right expression for "every weekday at 9am"

    You need a cron job for a daily standup reminder. Open the cheat sheet, search "weekday", grab `0 9 * * 1-5`, paste it, and you're done. The description confirms it runs Monday through Friday, not on weekends.

  • Preventing overlapping cron jobs

    Your 5-minute data-sync job sometimes runs longer than 5 minutes. Open the cheat sheet, find the `flock` entry, copy the pattern `flock -n /tmp/sync.lock /path/to/sync.sh`, and the job skips the run instead of starting a second instance.

  • Debugging why a cron job fails silently

    Your cron job appears to do nothing. Open the cheat sheet, find the "debug cron environment" entry, add `date >> /tmp/cron_test.log 2>&1` as a one-line test job, and compare the logged environment to your terminal's PATH. Nine times out of ten, a missing PATH entry is the culprit.

Common pitfalls

  • Using a bare command name like `node` or `python` without absolute path — the cron PATH is minimal and the command will not be found.

  • Putting a `%` literal in a cron command without escaping it as `\%` — unescaped `%` is treated as a newline, splitting the command into multiple lines.

  • Setting both day-of-month and day-of-week to non-`*` values — cron treats them as OR (runs if either matches), which surprises people expecting AND.

  • Relying on `.bashrc` or `.profile` for env vars — cron does not source login files; set all required env vars directly in the crontab.

  • Using `crontab -r` thinking it removes only one job — it wipes the entire crontab with no confirmation prompt and no undo.

Privacy

Everything runs in your browser. The cheat sheet is a static in-memory array and no text you type is sent anywhere. Works offline or on a server without internet access.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-07-01