Information for: DEVELOPERS   PARTNERS   SUPPORT

Scheduling site tasks with cron

To help your website run more efficiently, you should conduct regular website maintenance. By using cron, you can automate several of these maintenance tasks to run at scheduled intervals, based on your website’s needs.

Site Factory provides two methods that you can use to modify the interval and function of the scheduled tasks:

  • Create and manage scheduled tasks from the Site Factory Management Console
  • Control how often cron executes maintenance tasks on a per-website basis

Managing tasks using the Site Factory Management Console

You can use the Cron jobs page in the Site Factory Management Console to create and manage Drush commands. Such commands control many aspects of your websites’ maintenance and operation.

Note for SaaS+ subscription customers

If you need to schedule cron tasks based on a particular schedule, contact Acquia Support or your Technical Account Manager to add cron jobs to your Site Factory environments.

Running cron on your site

If you want to configure how often cron runs on a single website (which is used for tasks that include checking for updates and indexing), you can modify the interval at which the websites run cron, or even run cron manually.

Note

The website-based cron is triggered by website activity, so configuring the cron interval from the website does not guarantee that cron will run on the schedule that you define. To ensure a greater likelihood of a particular cron execution schedule, use the Cron jobs page in the Site Factory Management Console.

Scheduling jobs

  1. To ensure that your job runs multiple times throughout the day, use the Cron jobs page.
  2. To create scheduled jobs that are specific to the environment where they’re created, Using scheduled jobs to support your application. Scheduled jobs that run in the Cloud Platform use dedicated cron server and can run at a high rate. For example, every five minutes. You can use such jobs if your scheduling needs are not met by the Site Factory model.
  3. If the above jobs don’t meet your requirements, contact your account manager to set up scheduled jobs in the Site Factory Management Console. The scheduled jobs feature for Site Factory enables you to add one-time, complex data processing jobs to be executed at a single, specific time in the future.