Skip to main content
wp-config.org

Server configuration

Cron job generator

Choose when a task should run, build its command and get a cron entry you can understand.

  • Schedule presets
  • WordPress cron
  • Next run preview

Free, no sign-up. It runs in your browser, so nothing you type is sent to this site.

Nothing you enter leaves your browser.

This tool runs in your browser and needs JavaScript. Turn JavaScript on and reload the page.

Cron jobs

How cron works

Cron is a scheduler on your Linux server. It checks the schedule every minute and starts the command when the time fields match. A crontab is the list of jobs that belong to one user, and the jobs run with that user’s permissions even when nobody is logged in.

Calendar time, not a stopwatch. */5 * * * * matches minutes 0, 5, 10 and so on. It does not wait five minutes after the last run. 0 2 * * * matches 02:00 every day, and 0 9 * * 1-5 matches 09:00 on weekdays.

Check the server’s time zone. Schedules use the cron daemon’s local time zone, which can differ from your browser and from WordPress. Run timedatectl and date on the server. Cron does not replay every job it missed while the server was off.

The two day fields have a special rule. When both day fields are restricted, cron matches either one. 0 9 1 * 1 runs at 09:00 on the first of the month and on every Monday. It does not mean the first Monday. Leave one day field as * unless you want this rule.

Cron has a small environment. Use absolute paths for programs and files. Shell aliases and profile settings are usually missing. Jobs can overlap unless you add a lock. Keep passwords out of command lines and use application settings with suitable file permissions instead.

How to install and check your job
  1. Check the server and the command. On Ubuntu with the usual cron package, check systemctl status cron. If cron is missing, install it with sudo apt install cron and start it with sudo systemctl enable --now cron. Check program paths with command -v php, command -v wp or command -v curl. Other cron programs can use different service names.
  2. Test as the job owner. Run the manual test command shown above as the Linux account that owns the task. A good preview here does not check server paths or permissions.
  3. Back up the existing schedule. Run crontab -l as that account and save a private copy before you change anything. “No crontab for…” only means the account has no jobs yet.
  4. Add the job. For a user crontab, run crontab -e as that account, add the whole entry on one line and save. As an administrator you can edit a site owner’s crontab with sudo crontab -u site-user -e. Installing a downloaded file with crontab filename replaces the account’s entire crontab, so merge your other jobs into it first.
  5. Use the right format. A hosting panel usually has five schedule boxes and a separate command box: copy the time fields and the command part of the entry into them. For /etc/cron.d, choose the system format and a real Linux user, and save the download as /etc/cron.d/site-job. The file name can only use letters, digits, hyphens and underscores, so no dot, no space and no brackets, or cron ignores the file. If your browser saved a repeated download as site-job (1), rename it to site-job first. The file should be owned by root with mode 0644 and end with a newline. Do not paste a system-format entry into crontab -e.
  6. Check a scheduled run. Wait for a matching time and look at the application or the output log. Check journalctl -u cron --since today or /var/log/syslog where they exist. A record that cron started the job does not prove the application worked. A saved crontab takes effect without restarting cron. To pause a job, put # at the start of its line.
Using server cron with WordPress

WordPress normally checks for due tasks when visitors load the site. A server job can run them on a regular schedule, including on quiet sites. Choose the WordPress command type to make a WP-CLI job that runs wp cron event run --due-now, and start with every five minutes.

  1. Install WP-CLI and confirm the real wp path and WordPress directory. Run the job as the site owner, with the PHP version and permissions the site needs.
  2. Install the job and check one manual run and one scheduled run. Review due events with wp cron event list --path=/your/site. For multisite, set up and test each site separately, because this job targets one installation.
  3. When the server job works, add define( 'DISABLE_WP_CRON', true ); to wp-config.php once, before WordPress loads, or change an existing definition. This stops WordPress from checking on page loads. It does not remove the scheduled events.

If WP-CLI is not available, the HTTPS request type can call your site’s https://example.com/wp-cron.php?doing_wp_cron address. Make sure your access rules allow the request. A successful response does not prove every event finished.

What you can do

  • Schedule presets and five editable time fields

  • Shell, PHP, WP-CLI and HTTPS request commands

  • User crontab and system cron.d formats

  • Optional logging and flock overlap protection

  • Preview, copy and download in your browser

  • The next ten runs in a time zone you choose

How to use it

  1. Choose the schedule

    Choose a schedule and replace the example program, application and file paths with the real ones from your Linux server.

  2. Pick the format

    Select the user or system format, review the logging and overlap options, and test the command by hand as the account that will run it.

  3. Install and check

    Back up the existing jobs, add the new entry in the right crontab format and check a scheduled run in the application and server logs.

A schedule you can explain and check

This free cron job generator writes a traditional Linux crontab entry in your browser. Choose a common schedule or edit the five time fields, then build a shell command, PHP task, WordPress due-event runner or HTTPS request. The guide in the tool explains each field and how to install and check the job on your server.

Know the limits

Your browser does not run commands, install cron or check server paths, permissions or whether the task worked. Schedules use the time zone of the server's cron service. Only the five standard time fields are supported, so this is not a generator for seconds or year fields. Downloading a job does not install it, and installing a file with crontab replaces that account's whole crontab. Everything stays in your browser; only the server choices you select are remembered there.

Related tools

  • wp-config.php

    Build database, security and WordPress settings.

  • PHP extensions

    Choose PHP extensions and runtime settings.

  • Nginx

    Prepare routing, HTTPS and cache configuration.

  • WP-CLI commands

    Build installation and maintenance commands.