Kinsta’s container-based infrastructure means that every site runs in a private container with its own crontab. This means that at Kinsta, we allow our users to add real server cron jobs to each site container.

If you’d rather use the WordPress built-in cron system, please see our article on how to create and modify a WordPress cron job.

How to Write a Server Cron

A task added to crontab consists of two parts:

  1. A series of numbers and asterisks defining how frequently the cron should run.
  2. A command to be executed on the server.

When writing a cron, you’ll need to determine those two factors: the command that needs to be executed and how frequently it should be scheduled.

If you want to work out the crontab syntax yourself, the crontab documentation from The Open Group is a great place to learn and see some practical examples.

If you have written the command you want to add and you’d rather use a free tool to generate the full crontab syntax, there are a variety of online tools you can use to generate the full command in proper crontab syntax. Crontab Generator is one of our favorite tools that can be freely used for this purpose.

How to Add a Server Cron

Once you have the cron job ready to add to the container, you have two options:

To upload the job yourself,

  1. Access your site container over SSH
  2. Run this command crontab -e.
  3. Select your text editor of choice (select nano if you’re unsure).
  4. Paste your cron command at the end of the file.
  5. Then close the file. You’ll see a message like this confirming that the crontab has been updated: crontab: installing new crontab.
Run crontab -e and then select your preferred text editor.
Run crontab -e and then select your preferred text editor.

If you aren’t comfortable using SSH, you can open a new chat with our Support team and ask us to add the job to your site’s crontab.

Kinsta Policies on Server Cron Jobs