Configuring PolyAnalyst Scheduler

Scheduler is used to configure PolyAnalyst to perform certain actions at a specified time/with specified intervals or at server start.

There are three ways to open PolyAnalyst Scheduler:

  1. In the Analytical client go the File menu, select Web Applications, and click the Scheduler option (for regular users):

    sch open native
  2. In the Administrative Tool select Scheduler on the sidebar (for administrative users):

    sch open admin
  3. In the Windows task tray right-click on the PolyAnalyst server icon and select PolyAnalyst Scheduler (if the server is running as an application):

    sch open tray

When you open the scheduler for the first time with no events or tasks, you will see the following window:

sch open sch

First, add one or more events. To do so, right-click anywhere in the window and select the Add event option:

sch add event

Alternatively, click the menu button in the upper left corner of the window and select Add event:

sch add even burger

As shown on the screenshots above, there are two types of events:

  • Events executed on the server start;

  • Events executed at the specified time.

The first type allows users to use server start as a precondition for any number of scheduled tasks. If you select the second type of event, you can schedule the execution of one or several tasks at a specified time or at specified intervals.

You can add a task and then right-click on it and choose Import, e.g.

sch menu import

To export a created task either, clicking on the Export button via the context menu as well.

sch menu export

After you have selected and added an event, it will be displayed in the list:

sch select event

Note that one can select all the entries list by using a Ctrl + A keyboard combination.

PolyAnalyst automatically continuously numbers all events starting from the moment of system installation. So, when you add an event in the Scheduler, each event is assigned a sequence number. Thus, PolyAnalyst automatically assigns a unique name to each event. Right-click on the event to access the Rename option.

Configuring events

Select the TimeEvent (executed at the specified time) you have added. On the right you will see a list of options to configure this event:

sch time event

In the process of configuration, depending on your earlier choices, the options will change slightly.

For example, you can configure PolyAnalyst to perform a scheduled task every N day(s) (see the screenshot above), i.e.

  • If you select the Weekly option, you can specify the time interval in weeks, as well as a certain day of the week, e.g. every 2nd Monday;

  • If you select the Monthly option, you can specify the time interval in months, as well as a certain day of the month, e.g. the last day of every 2nd month.

You can specify the start time and the end time of scheduled task execution, as well as its interval in hours and minutes.

In the lower-right area you can specify the start and end dates of task execution.

sch start end date

If you want to configure PolyAnalyst to perform certain tasks on server start, select a SrvStartEvent you have created.

Contrary to time events, server events do not require any configuration.

All the events and tasks you add are saved automatically. After you have added the required events, you may start scheduling tasks.

Adding tasks

To create a new task, right-click the selected event and open the Add task menu. A list of tasks will be displayed:

sch add task

Alternatively, you can select an event, then click the menu button and select Add task.

All these tasks are enabled in the list only after you select an event in the tree. The following commands are available:

You can assign multiple tasks to the same event. The order of tasks in the tree determines the order of execution. The tasks of one level of the hierarchy are executed simultaneously.

Note that if you create subtasks, they inherit the following properties from their parents:

Testing tasks

Sometimes it is helpful after creating a task to verify that the task will execute as expected at a later point in time. To do it, right-click the task and select Test (immediate execution) in the context menu.

sch test task

PolyAnalyst begins executing the task immediately. The progress of task execution is not displayed. You can monitor the progress of the task by viewing the task list.

The Test (immediate execution) option is available only for the administrator and the task owner.

Note that testing a task that involves executing a project will still permanently alter the project in the same way that having the task execute at a scheduled point in time will permanently alter the associated project. There is no difference between testing a task and a normal execution of the task except the activation way.

Deleting events and tasks

To delete an event or a task, right-click on its name in the Scheduler window and select Delete. Alternatively, left-click on the event’s or task’s name in the hierarchy to select it and then click the Delete button on your keyboard.

sch delete task

If an event was deleted, any tasks configured for this event are also deleted. Similarly, if a task was deleted, any consecutive tasks (located under the task within the hierarchy of items) are also deleted.

Deleting events or tasks is an irreversible operation.

Cutting, copying, and pasting events and tasks

To copy one or more events or tasks:

  1. Select the events or tasks you wish to copy;

  2. Right-click on any one of the events or tasks that are selected and select either Cut or Copy options;

  3. Right-click on the required item within the tree (the root of the hierarchy of items, another event, or another task) and select Paste.

PolyAnalyst cuts or copies and pastes the selected events and tasks. Pasting an item does not clear the copy-and-paste clipboard. You can paste the same copied item repeatedly into the hierarchy of items.

Disabling and re-enabling events and tasks

When you create an event or a task, it is initially enabled. It means that the event/task can be executed. Disabling an event/task means that it remains as a configured event/task in the hierarchy in the Scheduler window, but PolyAnalyst prevents the event/task from executing at its scheduled time.

Rather than deleting an event/task that you do not wish to be executed on a schedule, and losing the time spent configuring the event/task, you can instead disable it. The event/task will remain scheduled, but will not be executed. You can still edit the properties of a disabled event/task.

To disable an event/task:

  1. Select the event/task in the hierarchy;

  2. Right-click on the event/task;

  3. Uncheck the Enable option in the context menu.

Disabled events/tasks remain in the hierarchy of items in a gray font.

To re-enable one or more events/tasks, repeat the previous steps and check the Enable option.

Toggling an event/task will automatically toggle all dependent subtasks. In other words, if you have task A and B, and task B is configured to run when task A completes, when you disable task A, the task B is also disabled.

Success and error alerts

The user can make PolyAnalyst send a particular kind of alerts in case of successful completion of a scheduled task, or failure, or both.

To do it, proceed as follows:

  • Select a task in the hierarchy and right-click on it. In the context menu select Edit e-mail options and specify, if you want the alert to be sent in case of successful completion of the task, or failure, or both;

  • Below, in the Recipients section, enter one or more e-mails. To confirm each e-mail address press the Enter key, so that your final list of recipients may look as follows:

sch email alert

Click OK to save the settings and close the window.

Using stored credentials

Before executing a scheduled task, PolyAnalyst checks the permissions of a specific user profile.

There are two authentication systems, i.e. that of PolyAnalyst and that of Windows. In PolyAnalyst it always works in the same way. In Windows we can work under the credentials of other users.

A scheduled task is always carried out under PolyAnalyst credentials of its owner, while the Use stored credentials option, when checked, changes the Windows user.

As a task owner, you can configure it to run under the credentials of yourself or under a different Windows user who may have different permissions. This is helpful when, for example, the task requires access to resources that a user would otherwise not be permitted to access or use (such as trying to open a CSV file located in a protected folder on an organization’s network).

If a task is run without using the stored credentials, it is run under the credentials of the server service account. However, if the server is configured to require impersonation (see the section on Impersonation policy in Administrative Tool security settings), when the server attempts to carry out the task that requires access to a protected resource (e.g. a folder of files shared with only certain Windows users), the task may fail to execute due to insufficient permissions. In this case, PolyAnalyst will record that as an error occurred.

To avoid it, you can attach a custom Windows user profile to your PolyAnalyst profile by editing your PolyAnalyst profile (via the Settings → My profile menu in the Analytical client). It virtually means storing credentials. Then, you can switch on this option for a task by right-clicking on the task in the Scheduler and selecting Use stored credentials. When it is time to carry out the task, PolyAnalyst will look up the associated credentials, authenticate itself in Windows as that user, and then carry out the task using the permissions of that user profile.

It is this process which is referred to as impersonation or delegation in Windows.

Stopping tasks

To stop a running task, right-click on the event or task and select the Stop tasks option.

sch stop tasks

Note that task execution locks the database and switches the server to the exclusive mode. No project can be opened, no client can be connected, many other tasks can also freeze or return the "PolyAnalyst is busy" error. On particular databases, it can take several minutes or dozens of minutes to complete a task.

Selecting a task user

If you are an administrator, you can select another PolyAnalyst user to perform the task you scheduled. To do so, right-click on the event or task, and then select the option Change task user. Select the required user from the list. Check the option All subtasks, if you want the user to execute the subtasks of the current task.

sch change user

Click OK to save the changes and close the window.

For security reasons, the option Change task user is not available for regular PolyAnalyst users.

Selecting a task owner

If you are an administrator, you can give another PolyAnalyst user the opportunity to edit (and own) the task you scheduled. To do so, right-click on the event or task, and then select the option Change task owner. Select the required user from the list. Check the option All subtasks, if you want the user to execute the subtasks of the current task. Click OK to save the changes and close the window.

sch change owner

The permission to edit (and own) a task can be granted to a group of users.

For security reasons, the option Change task owner is not available for regular PolyAnalyst users.