Cron Expression Generator by NexLink Core

Set up a schedule for automated restarts, backups and scripts without learning cron syntax first. Answer a couple of plain-English questions and the expression is written for you, along with a description of what it does and the next five times it will run.

Build a Cron Schedule

Cron Schedule Generator

Answer a couple of plain-English questions and get a working cron schedule for restarts, backups and scripts. Switch to Advanced if you already know cron syntax or want to decode an expression you have been given.

 

Times use your server's timezone, which is often UTC rather than your own. Check with timedatectl before assuming.

Next Runs

The next five times this schedule fires, shown in your browser's timezone.

    Simple or Advanced?

    The tool opens in Simple mode, which is all most people ever need.

    Simple asks how often you want the job to run — every few minutes, daily, weekly, monthly — and then only shows the follow-up questions that matter for that choice. Pick “Once a week” and you get day buttons and a time picker; pick “Every few minutes” and you get an interval. You never type cron syntax, and it isn’t possible to produce an invalid expression.

    Advanced exposes the raw expression and all five fields individually. Switch to it when you need something Simple can’t express — a range of hours, several specific minutes, or an every-N-days-of-the-month schedule. The expression box becomes editable in this mode, so it also works as an explainer: paste in an expression somebody handed you and read off what it actually does.

    Switching between modes carries your expression across. If you switch to Simple while holding an expression too specific to show with the simple controls, the tool says so and leaves it untouched until you change something.

    How Cron Expressions Work

    A standard cron expression is five fields separated by spaces:

    ┌─────────── minute (0-59)
    │ ┌───────── hour (0-23)
    │ │ ┌─────── day of month (1-31)
    │ │ │ ┌───── month (1-12)
    │ │ │ │ ┌─── day of week (0-6, Sunday = 0)
    │ │ │ │ │
    * * * * *

    Each field accepts four kinds of value:

    SyntaxMeaningExample
    *Every value* * * * * — every minute
    */nEvery n-th value*/15 * * * * — every 15 minutes
    a,b,cThese specific values0,30 * * * * — on the hour and half past
    a-bAn inclusive range0 9-17 * * * — hourly from 09:00 to 17:00

    These combine, so 0 8-18/2 * * 1-5 means “every two hours from 08:00 to 18:00, Monday to Friday”. You don’t need any of this to use Simple mode — it’s here for when you switch to Advanced.

    Tip

    Most cron implementations also accept three-letter names — JANDEC for months and SUNSAT for days. 0 4 * * SUN and 0 4 * * 0 are the same schedule, and this tool understands both.

    Useful Schedules for Game Servers

    ScheduleExpressionWhy
    Nightly restart0 5 * * *Clears memory leaks during the quietest hours
    Twice-daily restart0 5,17 * * *Busy servers that drift over a full day
    Every 6 hours0 */6 * * *High-population servers
    Hourly backup0 * * * *Frequent saves on progression servers
    Nightly backup30 4 * * *Half an hour before the restart, so the backup is clean
    Weekly maintenance0 6 * * 2Tuesday mornings, typically the lowest-traffic slot
    Monthly wipe0 12 1 * *First of the month at noon
    Warning

    Don’t schedule a backup and a restart for the same minute. Give the backup time to finish first — 30 4 * * * for the backup and 0 5 * * * for the restart leaves a comfortable half-hour gap.

    The Day-of-Month and Day-of-Week Trap

    This is the single most common cron mistake. When both the day-of-month and day-of-week fields are restricted, cron runs when either matches — not both.

    So 0 0 1 * 1 does not mean “the first of the month, but only if it’s a Monday”. It means “the first of every month, and every Monday”. If you need “the first Monday of the month”, cron alone cannot express it — schedule it for every Monday and have your script exit early when the date is past the 7th.

    The generator flags this whenever you restrict both fields. Simple mode never puts you in this position, since it sets only one of the two.

    Where to Put Your Cron Job

    On our panel, use the built-in Schedules feature rather than editing a crontab — it survives server moves and reinstalls, and it can run panel actions like power commands directly.

    On a dedicated machine, crontab -e opens your user’s crontab. Add the expression followed by the command:

    Terminal window
    0 5 * * * /home/steam/restart-server.sh >> /home/steam/logs/restart.log 2>&1

    Redirecting output to a log file, as above, is worth doing every time — otherwise cron mails the output into a void and a silently failing job can go unnoticed for weeks.

    Tip

    Cron runs with a minimal environment and a different PATH to your login shell. Always use absolute paths to binaries and scripts, and test with bash -l -c 'your command' if a job works by hand but not on a schedule.

    Frequently Asked Questions

    Do I need to understand cron syntax to use this?

    No. Simple mode never asks you to type an expression — pick a frequency, fill in the follow-up questions, and copy the result. The syntax reference above is there if you’re curious or if you need Advanced mode later.

    What timezone do the next run times use?

    Your browser’s local timezone. Your server may well be set to UTC — check with timedatectl on Linux before assuming a 05:00 job runs at 05:00 your time.

    Can cron run more often than once a minute?

    Not with a standard 5-field expression; one minute is the finest resolution. Some systems support a 6-field form with seconds at the front, but that is an extension rather than the standard, and this tool builds the standard five fields.

    Why does my job never run on the 31st?

    Because months with fewer than 31 days simply skip it. 0 0 31 * * runs seven times a year. For “the last day of the month”, run daily and let the script check whether tomorrow is the 1st.

    What does @reboot mean?

    It’s a shorthand some cron implementations accept in place of the five fields, running the job once when the machine boots. Others include @daily, @hourly and @weekly. They are convenient but not universally supported, so an explicit expression is the safer choice.

    Guide Navigation