You are here

Deferring the start of cron based jobs

You can configure and to implement a global delay to cron based jobs; for example, until after the server has fully started.
You can set a delay for all cron based jobs; in other words, jobs that use the org.alfresco.util.CronTriggerBean class. The default value is 10 minutes.
  1. Shut down the Alfresco Content Services server.
  2. Locate and edit the file in the <classpathRoot> directory.

    For information about modifying the file, see Modifying the global properties file.

  3. Add two configurations to the file, where the number in startDelayMins= is the number of minutes you want to delay your job. In this example, the delay length is 2 minutes:

    activities.feed.cleaner.cronExpression=0/1 * * * * ?
  4. Extend the with a new configuration in the <classpathRoot>/alfresco/extension directory:

    This file will override subsystem settings that are not applicable in For more information about log4j extensions, see file.

  5. Start the server.

    After the specified interval, the FeedCleaner trace logs will be generated. In the example, the logs will start after two minutes.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.