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
Your schedule
*/5 * * * *
Review your output
Your output will appear here
Complete the fields to generate valid output.
Test it by hand first
The command as a shell runs it, without the schedule, the user field or cron’s percent escaping. Run it in a terminal as the account that will own the job. It runs the task straight away.
Complete the fields to generate valid output.
Preview the next runs
An IANA time zone name that matches your server’s cron daemon. This does not change the entry or set up the server. Check it with timedatectl on the server.
Choose the server time zone, then calculate the next runs.
The preview lists the minutes when the time fields match, in the time zone above. Where both day fields are restricted, a match on either one counts. Cron on Debian and Ubuntu treats a daylight saving change of less than three hours specially for jobs that run at a set time: a job whose time was skipped runs right after the clocks go forward, and it does not run twice when the clocks go back. Jobs that run every so many minutes or hours follow the clock. The preview follows these rules. The runs made up after a clock change start right after it, and the real start times can be spread over the following minute or more.
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
- Check the server and the command. On Ubuntu with the usual cron package, check
systemctl status cron. If cron is missing, install it withsudo apt install cronand start it withsudo systemctl enable --now cron. Check program paths withcommand -v php,command -v wporcommand -v curl. Other cron programs can use different service names. - 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.
- Back up the existing schedule. Run
crontab -las that account and save a private copy before you change anything. “No crontab for…” only means the account has no jobs yet. - Add the job. For a user crontab, run
crontab -eas that account, add the whole entry on one line and save. As an administrator you can edit a site owner’s crontab withsudo crontab -u site-user -e. Installing a downloaded file withcrontab filenamereplaces the account’s entire crontab, so merge your other jobs into it first. - 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 assite-job (1), rename it tosite-jobfirst. The file should be owned by root with mode0644and end with a newline. Do not paste a system-format entry intocrontab -e. - Check a scheduled run. Wait for a matching time and look at the application or the output log. Check
journalctl -u cron --since todayor/var/log/syslogwhere 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.
- Install WP-CLI and confirm the real
wppath and WordPress directory. Run the job as the site owner, with the PHP version and permissions the site needs. - 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. - When the server job works, add
define( 'DISABLE_WP_CRON', true );towp-config.phponce, 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
-
Choose the schedule
Choose a schedule and replace the example program, application and file paths with the real ones from your Linux server.
-
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.
-
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.