Cron Expression Tester
Paste a cron expression — read it in plain English and see when it runs next, in your own timezone. No signup, no guessing.
Schedule library
Each page explains one real schedule: the exact expression, plain-English meaning, next run times, and the edge cases people trip on.
- Cron to Back Up a SQLite Database Every Day — Back up a SQLite database safely on a daily schedule using the .backup command and cron, with dated files. Why .backup beats copying the file.
- Cron to Clean Up Docker Images and Free Disk Space — Prune unused Docker images, containers, and volumes on a schedule with docker system prune and cron. The exact line and safe flags.
- Fix 'crontab: command not found' — Why the crontab command is missing and how to install it: cron package names on Debian/Ubuntu, RHEL/CentOS, and Alpine, plus enabling the service.
- Cron and Daylight Saving Time: Skipped and Doubled Jobs — Why cron jobs run twice or get skipped around DST changes, and how to avoid it: use UTC, or schedule outside the 1-3 AM switch window.
- Cron Expression to Run Every Day at 11 AM — The cron schedule to run a job every day at 11:00 AM: 0 11 * * *. Field-by-field breakdown and how to adjust the minute.
- Cron Expression to Run Every Day at 2 PM — The cron schedule to run a job every day at 2:00 PM: 0 14 * * *. Why 2 PM is 14 in cron and how to set the minute.
- Cron Expression to Run Every Day at 3 PM — The cron schedule to run a job every day at 3:00 PM: 0 15 * * *. Why 3 PM is 15 in cron and how to adjust minutes or days.
- Cron Expression to Run Every Day at 9 PM — The cron schedule to run a job every day at 9:00 PM: 0 21 * * *. Why 9 PM is 21 in cron and how to change the minute or restrict days.
- Cron to Run a Makefile Target on a Schedule — Run a make target from cron: the exact line, why to cd into the project first, and how to fix 'make: command not found' or 'No targets'.
- Cron to Run a PostgreSQL Query on a Schedule — Run a SQL query against PostgreSQL from cron with psql: the exact line, how to pass the password with .pgpass, and running a .sql file.
- Cron to Run an R Script on a Schedule — Run an R script from cron with Rscript: the exact crontab line, why to use the absolute path, and how to fix 'Rscript: command not found'.
- Cron to Run VACUUM on PostgreSQL — Schedule PostgreSQL maintenance with VACUUM ANALYZE from cron: the exact line, when manual vacuum helps alongside autovacuum, and VACUUM FULL cautions.
- /etc/crontab and /etc/cron.d Need a User Field — System crontabs in /etc/crontab and /etc/cron.d have an extra user field before the command. Leaving it out is a common reason those jobs silently fail.
- Cron */1 or * * * * * Job Not Running Every Minute — Why an every-minute cron job doesn't fire: minimum interval is one minute, common syntax mistakes, and how to confirm cron is actually launching it.
- Run Cron Jobs Inside a Docker Container — Docker images don't run cron by default. How to install cron, add a crontab, and keep the container alive by running cron in the foreground.
- Cron MAILTO: Send Job Output to an Email Address — How MAILTO works in a crontab, why you get no mail without a working MTA, and how to disable cron email or point it at a real address.
- "errors in crontab file, can't install" — Fixing a Rejected Crontab — Why crontab -e reports 'errors in crontab file, can't install' — usually a missing final newline or a malformed schedule line — and how to fix and reinstall it.
- Cron Job Runs but Produces No Output (No Mail) — Cron sends output by email, not to your terminal. Why you see nothing when a cron job runs and how to redirect stdout/stderr to a log file instead.
- Cron Job Fails Because PATH and Environment Variables Are Missing — Cron runs with a minimal environment, not your login shell. Why $PATH and other env vars are empty in cron and how to set them so your job finds its commands.
- Cron % Sign Error: Why Percent Breaks Your Crontab Command — In crontab a % is turned into a newline and passes text after it to the command's stdin. How to escape % with a backslash so date formats and other commands work.
- Run a Python Script with a Virtualenv from Cron — Cron ignores your activated virtualenv. How to run a Python script inside its venv from cron by calling the venv's python directly or activating it in the command.
- Cron Jobs Not Running Because the Cron Service Is Stopped — How to check whether the cron daemon is running and enable it to start at boot with systemctl, so scheduled jobs actually fire after a reboot.
- AWS EventBridge Cron Expression (cron() syntax) — EventBridge Scheduler / rules use a 6-field cron() expression in UTC with a required ? in a day field. The format, a 9am-weekdays example, and the ? rule.
- Cron Expression to Run Every Day at 10 AM — The cron schedule to run a job every day at 10 AM: 0 10 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 11 PM — The cron schedule to run a job every day at 11 PM: 0 23 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 1 AM — The cron schedule to run a job every day at 1 AM: 0 1 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 1 PM — The cron schedule to run a job every day at 1 PM: 0 13 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 4 AM — The cron schedule to run a job every day at 4 AM: 0 4 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 4 PM — The cron schedule to run a job every day at 4 PM: 0 16 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 5 AM — The cron schedule to run a job every day at 5 AM: 0 5 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Expression to Run Every Day at 6 PM — The cron schedule to run a job every day at 6 PM: 0 18 * * *. The exact crontab line, the field breakdown, and how to change the time.
- Cron Schedule Syntax for GitHub Actions (on: schedule) — How to schedule a GitHub Actions workflow with cron: the on.schedule.cron syntax, that it runs in UTC only, and the shortest interval GitHub allows.
- Jenkins Cron Syntax (H hash symbol explained) — Jenkins build-trigger cron syntax: the five fields plus the H (hash) symbol that spreads load. Why to use H/15 instead of */15 and example schedules.
- Kubernetes CronJob Schedule Syntax — The schedule field of a Kubernetes CronJob uses standard 5-field cron. A full manifest, the timezone field, and concurrencyPolicy to prevent overlap.
- Quartz Cron Expression (6–7 fields, ? and L) — Quartz scheduler cron: 6 or 7 fields with a seconds field, the ? placeholder, and L/W/# special characters. A weekday-9am example and common pitfalls.
- Spring @Scheduled Cron Expression (6 fields) — Spring's @Scheduled(cron=...) uses a 6-field expression with a leading seconds field. The format, a weekday-at-9am example, and how to set the zone.
- Vercel Cron Jobs Schedule (vercel.json) — Configure Vercel Cron Jobs in vercel.json: the 5-field cron syntax, that it runs in UTC, the Hobby-plan daily limit, and the path it calls.
- What Does 2>&1 Mean in a Crontab Line? — Plain-English explanation of >> file 2>&1 in cron: how stdout and stderr redirection work and the order that matters.
- Cron Job to Run apt update and Upgrade Automatically — Schedule apt-get update and upgrade from cron non-interactively, and why unattended-upgrades is usually the safer choice.
- Cron Job to Back Up to S3 Daily — Run a daily backup to Amazon S3 from cron using the AWS CLI. The command, timing, and the PATH gotcha.
- Send a Discord Notification from a Cron Job — Post a message to a Discord channel from cron using a webhook and curl. The exact command and how to avoid the %-escape trap.
- Cron Expression to Run Every 2 Minutes — The cron schedule to run a job every 2 minutes: */2 * * * *. How the step operator works on the minute field.
- Cron Expression to Run Every 4 Minutes — The cron schedule to run a job every 4 minutes: */4 * * * *. The step operator and why intervals should divide 60.
- Cron Expression to Run Every Day at 10 PM — The cron schedule to run a job daily at 10 PM: 0 22 * * *. Converting 10 PM to 24-hour cron time.
- Cron Expression to Run Every Day at 5 PM — The cron schedule to run a job daily at 5 PM: 0 17 * * *. How to convert 5 PM to the 24-hour cron format.
- Cron Expression to Run Every Day at 7 AM — The cron schedule to run a job daily at 7 AM: 0 7 * * *. How the hour field works and setting a different minute.
- Cron Expression to Run Every Day at 8 AM — The cron schedule to run a job daily at 8 AM: 0 8 * * *. The hour field and running on weekdays only.
- Run a WP-CLI Command from Cron — Schedule a WP-CLI command from cron: the full-path pattern, the correct --path flag, and running as the web user.
- Send a Telegram Message from a Cron Job — Send a Telegram alert from cron using a bot token, chat ID and curl. The exact one-line command.
- "errors in crontab file, can't install" — How to Fix — Fix the crontab error 'errors in crontab file, can't install': a bad schedule field, a missing newline, or a stray character on the last line.
- Cron Expression to Run Every Day at 3 AM — The cron schedule to run a job daily at 3 AM: 0 3 * * *. Why 3 AM is a common backup window and how to add a small random delay.
- Cron Expression to Run Every Day at 7 PM — The cron schedule to run a job daily at 7 PM: 0 19 * * *. How to convert PM times to the 24-hour cron format.
- Cron Expression to Run Every Day at 9 AM — The cron schedule to run a job daily at 9 AM: 0 9 * * *. How the hour field works and how to pick your timezone.
- Cron Expression to Run Monthly on the 15th — The cron schedule to run a job on the 15th of every month: 0 0 15 * *. How to pick the time and combine with the 1st.
- Cron Expression to Run Every Weekday (Mon–Fri) — The cron schedule to run a job every weekday: 0 8 * * 1-5. How the day-of-week range works and how to skip weekends.
- How to Run Cron Inside a Docker Container — Run cron jobs inside a Docker container: install cron, keep it in the foreground, and pass environment variables so jobs actually run.
- Cron Expression for the Last Sunday of the Month — Run a cron job on the last Sunday of every month with a day-of-month guard: the exact line and why plain cron can't do it alone.
- Run Multiple Cron Jobs at the Same Time — Schedule several cron jobs at the same time: one line each, or chain them in one command with && or a wrapper script.
- Cron Job Not Loading .bashrc or Environment Variables — Why cron ignores your .bashrc and PATH, and how to load the environment your job needs: source a profile or set variables in the crontab.
- Cron: Log Output to a File and See It in Real Time — Send cron job output to both a log file and stdout with tee, and how to append instead of overwrite so the log keeps history.
- Cron vs Anacron: What's the Difference? — Cron vs anacron explained: cron needs the machine on at the scheduled time, anacron catches up missed jobs on laptops and desktops.
- Cron to Alert on Low Disk Space — Check disk usage on a schedule with cron and email or Slack an alert when a filesystem gets full: the df threshold check script and the crontab line.
- Using /etc/cron.d for System Cron Jobs — How to add a system cron job in /etc/cron.d: the file format (which includes a username field), permissions, and how it differs from crontab -e.
- Cron Expression to Run Every 8 Hours — The cron schedule to run a job every 8 hours: 0 */8 * * *. The exact run times and when to use an explicit hour list instead.
- Cron Every Second? Why It Can't and What to Use — Cron's smallest interval is one minute — it cannot run every second. The honest answer plus two working alternatives: a sleep loop and a systemd timer.
- Cron Expression to Run Every Week — The cron schedule to run a job once a week: 0 0 * * 0. Pick the day and time, or use the @weekly shortcut.
- Cron Python 'ModuleNotFoundError' — Fix It — Your Python script runs fine in the terminal but throws ModuleNotFoundError under cron. Why it happens and the exact fix: use the right interpreter and PYTHONPATH.
- Cron to Restart a PM2 Process on a Schedule — Restart a Node app managed by PM2 from cron: the exact line, why to use the full PM2 path, and why pm2 reload or a memory limit is often better.
- Cron to Run a Node.js Script with nvm — Run a Node script from cron when Node is installed via nvm: why 'node: command not found' happens and the exact fix using the full nvm node path.
- Cron to Run a Python Script Every Day — Run a Python script on a daily schedule with cron: the exact line, using the venv interpreter, absolute paths, and logging output to debug it.
- Cron to Reboot the Server Weekly — Schedule a weekly server reboot with cron: the exact root crontab line, the absolute path to shutdown/reboot, and why a maintenance window matters.
- Cron to Send a Slack Notification (Incoming Webhook) — Post a message to Slack on a schedule with cron and curl: the exact line using an incoming webhook URL, the JSON payload, and how to include command output.
- User Crontab vs System Crontab — What's the Difference — The difference between a user crontab (crontab -e) and the system crontab (/etc/crontab): the extra user field, where each lives, and when to use which.
- Cron "command not found" — Fix the PATH — Cron jobs fail with command not found because cron uses a minimal PATH. Fix with absolute paths or a PATH line in the crontab.
- Cron Every 30 Seconds — Cron has no seconds field. Run a job every 30 seconds with two staggered lines and sleep 30, or use a systemd timer.
- Cron Every Monday, Wednesday and Friday — Run a cron job on Mon/Wed/Fri only: 0 9 * * 1,3,5. Day-of-week list syntax explained with the exact crontab line.
- Cron Every Tuesday and Thursday — Run cron on Tue and Thu only: 0 9 * * 2,4. The exact crontab line and day-of-week syntax.
- List All Cron Jobs (crontab -l) — See every cron job with crontab -l for your user, sudo crontab -l for root, and the system files in /etc/cron.*.
- Cron "Permission denied" — Fix It — Cron jobs fail with Permission denied when the script is not executable or paths are wrong. The exact fixes.
- Cron with a Random Delay — Stagger cron jobs with a random delay using sleep $((RANDOM % N)) or the RANDOM_DELAY setting to avoid thundering-herd load.
- Remove All Cron Jobs (crontab -r) — Delete every cron job for a user with crontab -r. Why it is dangerous and how to back up first.
- Cron to Run a Go Binary — Schedule a compiled Go program with cron using its absolute path and working directory. The exact crontab line.
- Cron to Run a Perl Script — Run a Perl script from cron with the absolute perl path and @INC/module gotchas. The exact crontab line.
- Cron to Run a Ruby Script — Run a Ruby script from cron with the absolute ruby path and rbenv/rvm gotchas. The exact crontab line.
- Cron to Run a Script in a Conda Environment — Run a Python script inside a conda environment from cron using conda run or the env's python path directly — without conda activate. The exact line.
- Cron to Clear a Cache Directory Daily — Delete old cache files on a schedule with cron using find -mtime -delete, or flush an app cache. Safe patterns that won't wipe the wrong path.
- How to Run a Cron Job Every 15 Seconds — Cron's smallest interval is one minute, so */15 seconds is impossible directly. The sleep-offset trick and a systemd timer alternative, with exact commands.
- Cron for the First Sunday of the Month — Run a cron job on the first Sunday of every month using a day-of-month range plus a weekday test. The exact expression and why day-of-week alone fails.
- Cron to Auto-Commit and Push with Git — Automatically commit and push changes on a schedule with cron: cd to the repo, stage, commit with a dated message, and push. The exact line.
- Cron to Restart Apache on a Schedule — Restart or gracefully reload Apache with cron using systemctl or apachectl graceful. The exact line, and why graceful beats a hard restart.
- Cron to Run an Ansible Playbook — Schedule an ansible-playbook run with cron: full binary path, inventory and playbook paths, and quiet output. The exact crontab line.
- Cron to Run a Docker Compose Command — Run docker compose from cron: cd to the compose file, use the full docker path, and prefer run --rm for one-off tasks. The exact crontab line.
- Cron to Run a Java JAR File — Schedule a Java JAR with cron using the full java path and -jar. Set the working directory and JAVA_HOME, and log output. The exact crontab line.
- Cron to Run a MySQL Query on a Schedule — Run a MySQL query or SQL file from cron using mysql -e, secure credentials with a defaults file, and log output. The exact crontab line.
- Cron to Run an npm Script — Run npm run <script> on a schedule with cron: absolute node/npm paths, cd into the project, and nvm gotchas. The exact crontab line.
- Cron to Run a Python Script with Arguments — Pass command-line arguments to a Python script from cron: quoting, absolute paths, and how % must be escaped. The exact crontab line.
- Cron to Back Up MongoDB Every Day — Run a daily MongoDB backup with mongodump and cron: the exact line, gzip archive, auth flags, and dated filenames.
- How to Temporarily Disable a Cron Job — Disable a cron job without deleting it: comment it out with #, or back up and clear the crontab. How to re-enable later.
- Cron to Download a File Daily with wget — Schedule a daily file download with wget and cron: output path, quiet mode, and retries. The exact crontab line.
- How to Redirect Cron Output to a Log File — Capture cron job output to a file with >> and 2>&1 so you can debug failures. Append vs overwrite and how to catch errors.
- Cron to Restart a systemd Service — Restart a systemd service on a schedule with cron using systemctl restart. The exact line, root vs sudo, and when a timer is better.
- How to Run a Cron Job as a Specific User — Run a cron job as another user with a per-user crontab, sudo -u, or the user field in /etc/crontab. Which method to use and why.
- Cron to Run a Django Management Command — Schedule a Django manage.py command with cron: use the virtualenv python, set the settings module, and use absolute paths. The exact line.
- Cron to Run Multiple Commands in One Job — Run several commands in one cron entry with && or ;. When to chain on success vs run regardless, and how to keep it readable with a script.
- Cron to Run a Node.js Script — Run a Node.js script on a schedule with cron: use the absolute node path, set the working directory, and log output. The exact crontab line.
- Cron to Run a Python Script in a Virtualenv — Run a Python script inside its virtualenv from cron without activating it: call venv/bin/python directly with absolute paths.
- Cron to Send an Email Report — Send a scheduled email from cron using MAILTO or piping output to mail/sendmail. The exact setup and why MAILTO may not fire.
- How to Set Environment Variables in Cron — Cron runs with a bare environment, so $PATH and your app vars are missing. Set them at the top of the crontab or source a file — the exact syntax.
- Cron to Back Up PostgreSQL Every Day — Dump a PostgreSQL database on a daily schedule with pg_dump and cron: the exact line, how to pass the password safely with .pgpass, and dated backup files.
- Cron to Curl a URL (Ping / Health Check) — Hit a URL on a schedule with cron and curl: keep a service warm, ping a health-check endpoint, or trigger a webhook. Silent flags and logging included.
- Cron to Restart a Docker Container on a Schedule — Restart a Docker container nightly with cron: the exact line, why to use the absolute path to docker, and why a restart policy is often better.
- Cron Expression to Run Every 3 Hours — The cron schedule to run a job every 3 hours: 0 */3 * * *. When to use a step value vs an explicit hour list, and the exact run times.
- Cron Expression to Run Every Thursday — The cron schedule to run a job every Thursday: 0 9 * * 4. How the day-of-week field works and how to set the time.
- Cron Expression to Run Every Tuesday — The cron schedule to run a job every Tuesday: 0 9 * * 2. How the day-of-week field works and how to pick the time.
- Cron Expression to Run Every Wednesday — The cron schedule to run a job every Wednesday: 0 9 * * 3. How the day-of-week field works and how to change the time.
- Cron for the Laravel Scheduler (schedule:run) — The one crontab line that drives Laravel's task scheduler: run php artisan schedule:run every minute. Exact path, user, and how to verify it fires.
- Cron to Run an rsync Backup Every Day — Sync files to another disk or server nightly with rsync and cron: the exact line, SSH key setup for remote targets, and safe delete flags.
- Cron to Run a Bash Script on a Schedule — How to run a shell/bash script from cron: make it executable, use the absolute path, and avoid the common PATH and permission errors. Copy-paste line included.
- Cron to Run a PHP Script on a Schedule — Run a PHP script from cron with the CLI binary: the exact crontab line, why to use php-cli not the web URL, and how to fix 'php: command not found'.
- Replace WP-Cron with a Real Cron Job (WordPress) — Disable WordPress's slow visitor-triggered wp-cron and drive it from a real system cron instead: the exact steps, the crontab line, and the interval to use.
- What does 0 0,12 * * * mean in cron? — 0 0,12 * * * runs at midnight and noon every day. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does 0 22 * * 1-5 mean in cron? — 0 22 * * 1-5 runs at 10:00 PM every weekday. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does 0 4 8-14 * * mean in cron? — 0 4 8-14 * * runs at 4:00 AM on the days 8 through 14 of each month. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does 15 14 1 * * mean in cron? — 15 14 1 * * runs at 2:15 PM on the 1st of every month. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does 23 0-20/2 * * * mean in cron? — 23 0-20/2 * * * runs at 23 minutes past every second hour from midnight to 8 PM. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does 30 2 * * 1-5 mean in cron? — 30 2 * * 1-5 runs at 2:30 AM, Monday through Friday. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does 5 0 * 8 * mean in cron? — 5 0 * 8 * runs at 00:05 every day, but only in August. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- What does */5 9-17 * * 1-5 mean in cron? — */5 9-17 * * 1-5 runs every 5 minutes during business hours on weekdays. Field-by-field breakdown, plain-English meaning, and the next run times — decoded live below.
- Cron to Back Up MySQL Every Day — Schedule a daily MySQL/MariaDB backup with cron: the mysqldump crontab line, dated filenames, and how to avoid exposing the password. Copy-paste ready.
- Cron to Auto-Renew Let's Encrypt (certbot) Certificates — Schedule certbot renewal with cron: the twice-daily crontab line Let's Encrypt recommends, why twice a day, and reloading nginx after renewal. Copy-paste ready.
- Cron to Delete Files Older Than N Days — Auto-delete old files with cron and find -mtime: the exact crontab line, keeping the directory, and avoiding accidental deletes. Copy-paste ready.
- Cron to Auto-Pull a Git Repo on a Schedule — Auto-update a git checkout with cron: the git pull crontab line, using the right user and SSH key, and logging conflicts. Copy-paste ready.
- Cron to Restart Nginx Every Night — Restart or reload nginx on a schedule with cron: the exact crontab line, why reload beats restart, and how to log the result. Copy-paste ready.
- Cron to Run a Python Script Every Hour — Run a Python script on a schedule with cron: the exact crontab line, using the venv interpreter, and fixing PATH/working-directory issues. Copy-paste ready.
- How to Comment Out a Cron Job (# Syntax) — Disable a cron job without deleting it by putting # at the start of the line. Cron ignores commented lines. You cannot put a comment at the end of a schedule line.
- Change the crontab -e Editor (Stop Opening vi) — crontab -e uses the EDITOR/VISUAL environment variable, falling back to the system default (often vi). Set EDITOR to change it, or run select-editor on Debian/Ubuntu.
- Cron Job Runs Twice? Why and How to Stop It — A cron job running twice usually means the entry exists in two crontabs (user and root), a DST fall-back repeated the hour, or overlapping runs piled up. Deduplicate crontabs and add a lock.
- Crontab Not Saving? "no crontab for user" Fixed — crontab -e edits a temp copy and only installs it when you save AND exit. "no crontab for user" means nothing was ever installed. Save with the editor, keep a trailing newline, and confirm with crontab -l.
- Prevent Overlapping Cron Jobs with flock — Stop a cron job from running while a previous run is still going: wrap it in flock -n so the new instance exits immediately. Full crontab example and how -n vs blocking behaves.
- Where Are Cron Logs? How to Check if a Cron Job Ran — Cron logs live in /var/log/syslog (Debian/Ubuntu) or via journalctl -u crond (RHEL/Fedora). Filter with grep CRON. A log line means cron fired; no line means the schedule or crontab is wrong.
- Cron Expression: Every 2 Weeks (Biweekly) — Cron has no week counter, so 'every 2 weeks' can't be one clean line. Run weekly and gate on the ISO week number modulo 2. Here's the exact pattern.
- Cron Expression: Every Other Day (Every 2 Days) — 0 0 */2 * * runs every other day, but */2 counts from day 1 each month, so the gap breaks at month boundaries. Here's why and a reliable fix.
- Cron Expression: First Monday of the Month — Cron has no direct 'first Monday' syntax. Run every Monday and gate to days 1–7 in the script. Here's the correct expression and the Vixie OR pitfall to avoid.
- Cron Expression: Last Friday of the Month — Cron has no 'last Friday' operator. Run every Friday and skip unless the next Friday falls in a different month. Here's the exact script gate.
- Cron Expression: Every Quarter (Quarterly) — 0 0 1 1,4,7,10 * runs at midnight on the 1st of January, April, July, and October — the start of each calendar quarter. Here's how it works and variations.
- Cron Not Sending Output Email? Set MAILTO or Log It — Cron emails a job's output to the crontab owner only if a mail transfer agent is installed. Set MAILTO=you@example.com, or just redirect output to a file with >> log 2>&1.
- Cron Has No Seconds Field: How to Run Every N Seconds — Standard cron only goes down to one minute — it has 5 fields, no seconds. To run every 30 seconds, use two offset cron lines with sleep, or a systemd timer.
- Cron Job Not Running? The 7-Point Checklist — Cron job not running: check crontab is installed (crontab -l), the cron service is up, the line has 5 fields + a newline at EOF, absolute paths, correct user, and the log.
- Run a Cron Job at Startup with @reboot — Use @reboot instead of the five time fields to run a job once every time the system boots: @reboot /path/to/script.sh. Works in user and root crontabs.
- Cron @daily, @hourly, @weekly: Special Strings Explained — Cron accepts shortcuts instead of five fields: @yearly, @monthly, @weekly, @daily (midnight), @hourly (top of the hour) and @reboot. Here is exactly when each fires.
- Cron Running in the Wrong Timezone? Set CRON_TZ — Cron uses the system timezone by default. To run a job in a specific zone, put CRON_TZ=America/New_York above the line (Vixie cron), or change the system time with timedatectl.
- Cron: Day-of-Month and Day-of-Week Together (the OR gotcha) — When both the day-of-month and day-of-week fields are restricted, cron runs when EITHER matches — not both. Here is the rule and how to force AND.
- Cron Job Runs But the Script Fails: PATH and Environment — Cron runs with a minimal environment and a short PATH (usually /usr/bin:/bin). Commands that work in your shell fail under cron. Here is why and the fixes.
- Cron: The Percent Sign (%) Breaks Your Command — In a crontab, an unescaped % becomes a newline and everything after it is fed to the command as stdin. Escape it as \% — common with date +%Y.
- Cron: Combine a Range and a Step (0-30/5) — You can limit a step to part of a field: 0-30/5 runs every 5 minutes but only in the first half of the hour. Here is the syntax and common patterns.
- Cron Step Values: What */5 Really Means — */5 does not mean 'every 5th run' — it means minutes divisible by 5 within the field's range, and it resets every hour. Here is how step values actually work.
- Cron: Is Sunday 0 or 7 in the Day-of-Week Field? — In standard cron both 0 and 7 mean Sunday. Here is the exact rule, the Quartz difference, and why 0-6 vs 1-7 matters.
- Cron Expression: Every 12 Hours — The cron expression to run a job every 12 hours is 0 */12 * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every 20 Minutes — The cron expression to run a job every 20 minutes is */20 * * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every 3 Minutes — The cron expression to run a job every 3 minutes is */3 * * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every 4 Hours — The cron expression to run a job every 4 hours is 0 */4 * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every 45 Minutes — There is no single cron expression for every 45 minutes because 45 does not divide 60 evenly. Here is why, and the two reliable ways to do it.
- Cron Expression: Every 90 Minutes — There is no single cron expression for every 90 minutes because 90 is more than an hour and does not align to the clock. Here is why, and the workarounds.
- Cron Expression: Every Day at 6am — The cron expression to run a job every day at 6am is 0 6 * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: 1st and 15th of the Month — The cron expression to run a job on the 1st and 15th of every month is 0 0 1,15 * *. Read it in plain English and preview the next run times.
- Cron Expression: Business Hours — The cron expression to run a job hourly during business hours on weekdays is 0 9-17 * * 1-5. See ranges explained and preview the next runs.
- Cron Expression: Every 10 Minutes — The cron expression to run a job every 10 minutes is */10 * * * *. See it explained field by field and preview the next run times.
- Cron Expression: Every 15 Minutes — The cron expression to run a job every 15 minutes is */15 * * * *. Read it in plain English, see it explained field by field, and preview the next run times in your timezone.
- Cron Expression: Every 2 Hours — The cron expression to run a job every 2 hours is 0 */2 * * *. See it explained and preview the next run times.
- Cron Expression: Every 30 Minutes — The cron expression to run a job every 30 minutes is */30 * * * *. Read it in plain English and preview the next run times.
- Cron Expression: Every 5 Minutes — The cron expression to run a job every 5 minutes is */5 * * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every 6 Hours — The cron expression to run a job every 6 hours is 0 */6 * * *. See it explained and preview the next run times.
- Cron Expression: Every Day at Midnight — The cron expression to run a job daily at midnight is 0 0 * * *. It fires once a day at 00:00. See it explained field by field and preview the next runs in your timezone.
- Cron Expression: Every Hour — The cron expression to run a job every hour is 0 * * * *. It fires once at the top of each hour. See it explained, read it in English, and preview the next runs in your timezone.
- Cron Expression: Every Minute — The cron expression to run a job every minute is * * * * *. Here is what it means and when you should avoid it.
- Cron Expression: Every Monday — The cron expression to run a job every Monday at midnight is 0 0 * * 1. See the weekday field explained and preview the next runs.
- Cron Expression: Every Sunday at Midnight — The cron expression to run a job every Sunday at midnight is 0 0 * * 0. See the weekday field explained and preview the next runs.
- Cron Expression: Weekends Only — The cron expression to run a job on weekends (Saturday and Sunday) is 0 0 * * 6,0. See the weekday field explained and preview the next runs.
- Cron Expression: First of the Month — The cron expression to run a job on the first day of every month is 0 0 1 * *. See the day-of-month field explained and preview the next runs.
- Cron: Last Day of the Month — Standard cron cannot express the last day of the month directly. Here are the real recipes: a guarded 28-31 run, or the L syntax in Quartz.
- Cron Expression: Twice a Day — The cron expression to run a job twice a day at midnight and noon is 0 0,12 * * *. See it explained and preview the next runs.
- Cron Expression: Monday to Friday at 9am — The cron expression to run a job at 9am on weekdays is 0 9 * * 1-5. It runs Monday through Friday and skips the weekend. See it explained and preview the next runs.
- Cron Expression: Once a Year — The cron expression to run a job once a year on January 1st is 0 0 1 1 *, also written @yearly. See it explained and preview the next runs.
- Cron Expression: Every Day at 2am — The cron expression to run a job every day at 2am is 0 2 * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every Day at 8pm — The cron expression to run a job every day at 8pm is 0 20 * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every Day at Noon — The cron expression to run a job every day at noon is 0 12 * * *. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every Friday at 5pm — The cron expression to run a job every Friday at 5pm is 0 17 * * 5. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Every Saturday at Midnight — The cron expression to run a job every Saturday at midnight is 0 0 * * 6. Read it in plain English, see it field by field, and preview the next run times.
- Cron Expression: Weekdays at 5pm — The cron expression to run a job on weekdays at 5pm is 0 17 * * 1-5. Read it in plain English, see it field by field, and preview the next run times.