We have a new community! Please visit support.timextender.com
Follow

Scheduled Execution

Note: There is an updated version of this article, which applies to the next generation of TimeXtender.

Scheduled Execution

When your project is ready, you would typically like the entire project, or part of it, to be executed according to a schedule. One common scenario is to execute the project every night to ensure that the business users have updated numbers in the morning.

No matter what you needs are, the answer in TimeXtender is the execution package. An execution package contains tables, cubes and other objects that will be executed when the package is run. You can schedule the package to be run at specific times and set up notifications to e.g. alert you if a scheduled execution fails. You can also set up conditions that need to be fulfilled for a execution package to run.

Note: An execution package will only execute the objects in the package, not deploy them. If changes have been made to the project, but have not been successfully deployed, the scheduled execution package will most likely fail.

Adding an Execution Package

An execution package determines which objects in a project will be executed and how. To create an execution package, follow the steps below.

  1. On the Execution tab, right-click Execution Packages and then click Add Execution Package. The Add Execution Package window appears.
  2. Type a Name for the execution package.
  3. In the Include/Exclude Steps tab, choose the steps you want to include in or exclude from the execution package by dragging objects from All Steps to Include Steps or Exclude Steps, respectively. For instance, simply drag the Execute Project step to Included Steps if you want to execute the entire project when the package is executed. If you want to exclude the entire project except one or more steps, simply drag those steps to Exclude Steps. Right click an object and click Remove Step to remove a step from the Include Steps or Exclude Steps.
  4. (Optional) On the Full load tables tab, drag any incrementally loaded tables, you want to have full loaded in this execution package, from All Tables to Full Load Tables. You can also drag business units, data warehouses, SSAS Multidimensional servers or the entire project.
  5. (Optional) On the Concurrent packages tab, select the other packages that can execute concurrently with the package you are adding. The scheduler service will not run two packages from the same project at the same time unless you explicitly allow it in this way.
    Note: When you set package "A" to be able to execute concurrently with package "B", package "B" will also be set to be able to execute concurrently with package "A". In other words, if you want to be able to execute "A" when "B" is already running, you cannot use this functionality to prevent "B" from being run when "A" is already running.
  6. Enter the maximum number of steps that can run in parallel during execution in Max. Threads. The optimal number of threads depend on server resources. Too few threads means slower than necessary execution times, while too many threads can cause the server to become slow or unresponsive.
  7. Clear the Log Execution time and/or the Log Row Countcheck boxes if you do not want to log this information.
  8. Select a setting for Managed Execution. You have the following options:
    • Disabled: Managed execution is disabled. Objects will be executed in the order they are listed in the tree.
      Warning: If you disable managed execution, tables are executed in the order in which they appear in the tree. To avoid errors during execution, you must ensure that tables are executed in a logical order. For example, an Order table must be executed before the related Order Detail table. Tables can be moved up and down the tree using drag-and-drop or the keyboard combination Alt+Up/Down.
    • Execution Number: When more than one object is ready to executed, TimeXtender prioritizes the objects based on their position in the tree from top to bottom.
    • Classification: When more than one object is ready to executed, TimeXtender prioritizes the objects based on their table classification. The order will be “Fact Table – Large”, “Fact Table”, “Dimension Table – Large”, “Dimension Table”. If two tables have the same classification TimeXtender will use the execution number as the secondary criteria.
    • Execution Time: When more than one object is ready to executed, TimeXtender prioritizes the objects based on their average execution time so that the object with the longest execution time is executed first. If two tables have the same execution time (e.g. in case of new objects), TimeXtender will use the execution number as the secondary criteria. When execution time of the objects in the project are known, this option will result in the shortest execution time in most cases.
  9. Check Merge Steps if you want to treat all individual sub-steps of the chosen steps as one big collection. This can speed up execution.
  10. (Optional) In the Prioritizer list, click the prioritization you want the execution package to use. For more information on prioritization, see Adding a Prioritization.
  11. Under Failure Handling, select what Action TimeXtender should perform if the execution fails. You have the following options:
    • Fail Package: When a step fails, the execution is stopped and the package is declared failed.
    • Retry Step: When a step fails, the step will be retried until the maximum number of retries for the entire package or the individual step is reached. Enter the maximum number of retries allowed for the package in the Retries box and the maximum number of retries allowed for an individual package in Retries per Step. Enter the amount of time to wait between retries in Retry delay in minutes.
  12. Under Post Execution, select a Notification on Success and a Notification on Failure. You have to create a notification before it is available from the list. See Adding Notifications below.
  13. If you want to run a package after the execution, select the package in Run Package.
  14. Click OK to add the execution package.

Adding an Execution Schedule

When you specify an execution schedule, the execution process is started automatically at the specified time.

Note: For each project, make sure to schedule packages so that start times are at least two minutes apart. The scheduler service checks for packages to execute every two minutes. If more than one package is scheduled to start within two minutes, one of them will be executed, but it might not be the one you expect. In addition to this, it will skip a scheduled execution if a scheduled execution of a package in the same project is running and the two packages are not configured to be able to run concurrently.

To add an execution schedule, follow the steps below.

  1. On the Execution tab, expand Execution Packages, right-click the relevant execution package, and click Add Schedule. The Schedule window appears.
  2. You have three different options for specifying the schedule:
    • To set up multiple daily executions in a specific time frame, click Daily and then click Frequency. In the Start time field, enter the start time of the time interval. In the End time field, enter the end time of the interval. In the Run every field, specify the number of hours and minutes between each project execution.
      mceclip0.png
    • To set up one or more daily executions on specified hours, click Daily and then click Specified Hours. Enter the exact time for the execution to run and then click Add Time.
      mceclip1.png
    • To set up weekly executions, click Weekly. Select the day(s) when the project should execute, enter the Start time for the execution, and then click Add Time to add the time to the schedule. Repeat this step for each day and time that you want to execute the project. A project can be executed several times a day and several times during the week. To view the entire weekly schedule, click Show All.
      mceclip2.png
  3. Select Enabledto activate the schedule, and then click OK.

Note: You can get an overview of the previous executions of an object by right-clicking on it an clicking on View Execution overview Log. Additionally, all events that happen during execution are registered in the Windows Event Log.

Adding a Notification

Notifications can be used to alert specified individuals when the execution package was successfully run or in case something caused it to fail. Notifications are most commonly set up as email alerts, but can be saved to the Event Log as well.

  1. On the Execution tab, right-click Notifications, and click Add Notification. The Notification window appears.
    mceclip3.png
  2. Enter a Name for the notification and select the Type the type of notification you want to create. You have the following options:
    Option Description
    Mail Creates an email notification
    EventLog Writes a notification to the event log
    Both Creates both an email notification and writes to the event log
  3. Enter the information for the SMTP server you want to use under Mail Server.
    • Since October 1st, 2022 Microsoft has ended basic authentication on email on online SMTP servers. To deal with this you need to add an Application ID from an app created for this and the Tenant ID for your company. The app you use needs the following permissions.
      mceclip0.png
      • You need the three options, (Mail.Send, SMTP.Send and User.Read) set on your app

      • You need a Admin to grant consent for the three settings.

      • The user account you add as the From Email and the User name needs to run without Multi-factor Authentication.

    • If you use GMail to authenticate, it is not possible to use email and an std password anymore. Here you need to turn on 2-step authentication for your email account and then use the App Password in the password field.
  4. Enter the email addresses of the recipients and a Subject under Mail Recipient. In the subject, you can use the following variables:
    • %Project%: The name of the project.
    • %Status%: The status of the execution (Success / Fail).
    • %ExecutionPackage%: The name of the execution package.
  5. Click OK.

The notification can now be selected when you create an execution package.

Adding a Prioritization

You can choose what objects to prioritize during a managed execution. This is useful if you, for instance, only have a small timeslot for extracting data from a source, or if you would like to have a certain cube ready for the users as early as possible during execution.

To set up a new prioritization for use in an execution package, follow the steps below.

  1. On the Execution tab, right-click Prioritizations and click Add Prioritization. The Add Prioritization window opens.
  2. In Name, type a name for the prioritization.
  3. Drag and drop an object from the Available Objects tree to Selected Objects to add this object to prioritized objects.
  4. Click an object in the Selected Objects list to have the execution steps for that object displayed under Object Settings. Select or clear the individual steps under Selected steps to configure what steps will be prioritized in the execution. For instance, you might only want to prioritize the transfer of data from a specific table because your priority is to have the transfer completed as soon as possible.
  5. Select Blocking if you want the execution to halt all other execution tasks until the selected steps for the selected object have been completed.
  6. Click OK to close the window and create the new prioritization.

Adding a Usage condition

If you want to execute an execution package only under certain conditions, you can add a usage condition to the execution package. For instance, if you use multiple environments, you could have an execution package execute only in your production environment. To add a usage condition to an execution package, follow the steps below.

  1. Add the project variable you want to use in your usage condition. See Adding a Project Variable.
  2. On the Execution tab, expand Execution Packages, right-click the relevant execution package, and click Add Usage Condition. The Usage Condition pane appears:
  3. The available project variables are listed in the window. Click the variable you want to use. In the example above, the "environment" variable has been selected.
  4. In the Operator list, click the operator you want to use.
  5. In the Comparer list, click the data type you want to use when comparing the variable to the value.
  6. In the Value box, type the value you want to compare the variable against.
  7. Click Add to add the usage condition.

If you try to manually execute a package with a usage condition that evaluates to "true", a warning message will pop up. The same message will be written to the log if you try to execute the package in a scheduled execution.

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.