+

Search Tips   |   Advanced Search

Scheduling tasks


The Activities, Communities, Files, Forums, News, Search, and Wikis applications use the WAS scheduling service for performing regular tasks. Use wsadmin to change the schedule by which a task runs or to disable a scheduled task altogether.

The scheduling service allows you to reliably process workloads using parallel processing, and to schedule resource-intensive tasks during off-peak hours when there is low traffic.

The scheduling service is based on the Cron calendar, which uses predefined date algorithms to determine when a task should run. Connections tasks are configured by default to run on a certain schedule. We can change the time at which the scheduled tasks run using wsadmin commands to edit the configuration files for the associated application. Cron schedule values use the following syntax:

Specify an asterisk (*) to indicate to select all options.

For example, if we specify * as the value of the dayOfWeek parameter, the task runs every day of the week.

Always set seconds to 0, except for in the Profiles task, which runs every 20 seconds and is specified using the syntax */20.

The */n syntax means take the first value in the range, and then every nth value. So, if you specified */3 in the month position, the task would run quarterly in January, April, July, and October.

dayOfMonth and dayOfWeek are mutually exclusive; always set one to ?.

The ? indicates that no value is being provided.

We can indicate in a single cron expression you want a task to run multiple times by using multiple values separated by commas or we can specify a range by separating the values with a dash.

For example, specifying 1,4,7,10 in the month position specifies you want the task to run quarterly. Specifying 2-6 in the dayOfWeek position indicates you want the task to run Monday through Friday.

  • If it is easier for you to read and define the schedule by separating out the values into multiple cron expressions, we can do so and use a | to concatenate the values into a composite schedule.

    For example, you could indicate to schedule to run quarterly at 3:45 PM on the second day of the month using the following string:

      0 45 15 2 1 ? | 0 45 15 2 4 ? | 0 45 15 2 7 ? | 0 45 15 2 10 ?

    To see examples of cron expressions and what they mean, see Examples of scheduler values.

    To disable a scheduled task, use wsadmin commands.


    See


    Parent topic:
    System maintenance


    Related:
    WAS scheduling service
    Cron calendar
    Manage the Search index