Take care: This article is maybe outdated or at least a bit neglected. It hasn't been updated for a while.

Using Cron Jobs

Use time scheduled cron jobs to execute long running operations in the background. They run at defined times, independent of visits to the web application.

Use cases

Database maintenance: say the web application cumulates data which needs to be transformed and/or wiped periodically. A Cron Job allows you to make sure the app/console db:cleanup - or whatever - script executes hourly, daily, weekly or whenever your want.

Cache clearing: say the web application has a news site, which homepage must be rebuilt every ten minutes or so. With a Cron Job you can schedule a cleanup of the homepage.


Cron Jobs are only available for certain App plans. Please see the plans & pricing page for more.


You can configure your App's Cron Job in the Dashboard > {{app-name}} > Settings > Cron Jobs. To start a new Cron Job you'll need the set the following parameters:


A unique name, so the job can be identified later on in the logs or statistics.


The PHP command which shall be executed, eg app/console db:cleanup or path/to/my-script.php


The interval at which you want to execute the job. The interval length is guaranteed, the exact time of execution is randomized. For example: an "every hour" interval will run once per hour with 60 minutes in between. However, it won't necessarily run at the 0th minute. It could run at the 11th minute or the 43th minute of every hour. All daily, weekly and monthly jobs run between 00:00 and 10:00 UTC. Weekly intervals will run on Monday.


All output generated by Cron Jobs can be accessed via log files and live logs.


  • Crons on fortrabbit are managed in the Dashboard, not via SSH
  • Only one cron per Universal App, not multiple
  • Crons can only run every hour, not every minute


Universal Stack Apps have limited resources - shared with the PHP memory. Professional Apps come with the Worker Component, which offers dedicated resources — not shared. The Worker Component also allows multiple Cron Jobs per App and additionally Nonstop Jobs, which are persistently running background workers. Shorter intervals are also possible.

Further reading

Craft CMS

Install guides

Develop & deploy





Tips & tricks

Need individual help?
Learn about Company plans ›
Looking for an old article?
See the full list of articles ›
Found an error?
Contribute on GitHub ›