Skip to main content

Scheduling and Running Tasks (2.7)

To schedule recipes and other tasks, you use the Business Scheduler, which you can also use to run tasks manually. There are three types of tasks:

  • Recipe, which runs a single recipe

  • AtScaleCube, which rebuilds a cube

  • Snapshot, which performs a snapshot run

Scheduling a Task

To schedule a task:

  1. Click the Business Scheduler icon in the application menu.

    The system displays a table that lists the currently defined schedule items; if needed, use the filters at the top of the table to narrow down what is shown.

  2. Click Schedule Task.

    The system displays a table that lists the items that can be scheduled. If needed, use the filters at the top of the table to narrow down what is shown.

  3. Click the row corresponding to the item to schedule.

  4. Specify the following information:

    • Task DescriptionRequired. Type a brief description for this task.

    • EntityRequired. Select the entity whose calendar information you want to use.

    • Enabled—Optionally clear this check box if you want to disable this task (for example, if you are not ready to run or schedule it).

    • Tag, Dependency Expression, and Dependency Inactivity Timeout—See Managing Task Dependencies.

    • Workflow Role for Handling ExceptionsRequired. Select the role that should receive any workflow items in case of exceptions related to this task.

    • Email Distribution List for Error Notifications—Select the email distribution list that should receive messages when this task encounters an error.

    • Email Template for Error Notifications—Select the email template list to use when sending messages when this task encounters an error. This is required if you select Email Distribution List for Error Notifications and is hidden otherwise.

    • Email Distribution List for Success Notifications—Select the email distribution list that should receive messages when this task runs successfully.

    • Email Template for Success Notifications—Select the email template list to use when sending messages when this task run successfully. This is required if you select Email Distribution List for Success Notifications and is hidden otherwise.

    Then for Scheduling Details, either select the Manually Run check box or specify the following information:

    • Type of frequency to run atRequired. Select the option that best describes how often to run this task.

      Depending on your selection, the page may show additional items to control the scheduling, such as the specific days of the week, the specific months, and so on.

    • On HolidaysRequired. Select the option that describes how to handle holidays: Don’t Run, Run Anyway, Run Next Business Day, Run Previous Business Day.

    • Run on the Following Days of the WeekRequired if task runs every calendar day or every business day. Select each day on which the task should be run.

    • Start Time on Scheduled DaysRequired. Select the time of day when the task should be started (using the local time zone defined for the associated entity).

    • End Time on Scheduled DaysRequired if task runs more than once a day. Select the time of day after which the task should not be started (using the local time zone defined for the associated entity).

    • Schedule Task End Time—Optionally select this if you want the task to stop running at a specific date and time. If you select this option, also specify Task End Date and Task End Time.

    The system displays additional fields to prompt you for information as needed. For example, if Type of frequency to run at is Run Every X Minutes, the system displays the field Run Every X Minutes, which you use to specify the number of minutes.

    If you select Manually Run, the task is not run until a user chooses to run it.

  5. Click Save Task.

Managing Task Dependencies

There may be specific tasks that you want to run only after other tasks have been run, on the same day; the system provides a way to manage these dependencies. To specify that one task (task A) should not be run until another task (task B) has completed, you use the following system:

  • Decide on a unique, short tag that describes this dependency (for example, backup). Note that tags are case-sensitive.

  • When scheduling the task or tasks that need to occur first (in our example, task B), specify the Tag field, using the tag you have decided on.

  • When scheduling the dependent task (task A), specify Dependency Expression, which uses a special kind of syntax. In its simplest form, a dependency expression has the form FUNCTIONNAME(tag), where FUNCTIONNAME is either TODAY or WINDOW and tag is a tag that has been applied to some other task. The meaning of the expression depends on the function. As an example, consider the following example dependency expression:

    TODAY(backup)
    

    This expression means that the task should not be started until the completion (today) of a task that is tagged with the backup tag.

    You can combine dependency expressions via the keywords AND and OR, along with parentheses. For example:

    TODAY(tagA) OR (TODAY(tagB) AND TODAY(tagC))
    
  • In addition to specifying Dependency Expression, you can specify Dependency Inactivity Timeout in seconds.

Functions Available in Dependency Expressions

This section provides reference information on the functions that can be used in dependency expressions:

TODAY(tag)

Where tag is a tag of the event to wait for.

This dependency expression means to wait until the completion (today) of a task that is tagged with tag. Unlike the WINDOW() function, TODAY() considers only events within the same day.

WINDOW(tag,lower,higher)

Where:

  • tag is a tag of the event to wait for.

  • lower is a positive number of hours. This argument specifies how old the event can be, from the moment the system began checking for it.

  • higher is a positive number of hours. This argument specifies how long to wait for the event, from the moment when the system began checking for it.

This dependency expression means the system will either run the task if the given event was completed within the last lower hours ago or will wait higher hours for that event to complete. This window of time can span days. For example, consider a task (called Sample Task) that uses this dependency expression:

WINDOW(backup,4,4)

Suppose that Sample Task starts running at 11 PM. In this case, the system first checks to see if the backup task has completed within the last four hours (that is, after 7 PM); if so, the system starts Sample Task immediately. On the other hand, if the backup task has not completed yet, the system waits, potentially until 3 AM. At any time before 3 AM, if the backup task is completed, the system starts Sample Task after the backup task is completed.

Modifying a Task

To modify a task definition (for example, to change the schedule details):

  1. Click the Business Scheduler icon in the application menu.

    The system displays a table that lists the items that are currently scheduled. If needed, use the filters at the top of the table to narrow down what is shown.

  2. Click the three dots in the row for the task. This displays a menu.

  3. Click Edit Task.

  4. Modify details here in the same way as when you schedule a task.

  5. Click Save Task.

    The system runs the task (or attempts to) within the next minute. When it does so, it updates the Run History section of this page.

Running a Task Manually

To run a task manually:

  1. Click the Business Scheduler icon in the application menu.

    The system displays a table that lists the items that are currently scheduled. If needed, use the filters at the top of the table to narrow down what is shown.

    Tasks that can be run manually are displayed here with Next Run as Manual; these are tasks defined with the Manually Run check box selected.

  2. Click the three dots in the row for the task. This displays a menu.

  3. Click Open Task Details.

  4. Click Manually Run Now.

  5. Click Run Task to confirm.

    The system runs the task (or attempts to) within the next minute. When it does so, it updates the Run History section of this page.

Aborting a Task

To stop a task that is currently running:

  1. Click the Business Scheduler icon in the application menu.

  2. Click the three dots in the row for the task. This displays a menu.

  3. Click Open Task Details.

  4. Click Abort Task.

  5. Click Abort Task to confirm.

    The system runs the task (or attempts to) within the next minute. When it does so, it updates the Run History section of this page.

Also see Handling Task Errors.

Deleting a Task

To delete a task definition:

  1. Click the Business Scheduler icon in the application menu.

  2. Click the three dots in the row for the task. This displays a menu.

  3. Click Open Task Details.

  4. Click Delete.

  5. Click Delete to confirm.

See Also

FeedbackOpens in a new tab