Automate operations in Vertec

How to automate tasks in Vertec using batch files and task scheduling on your server

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 21.05.2003
Machine translated
Updated: 30.06.2020 | Adapted to Vertec 6.4.

Certain operations in Vertec can be performed regularly overnight. Examples are the calculation of business intelligence data or project values that would tie up too many resources during operation.

Starting with Vertec 6.4, there are scheduled tasks for this purpose, which enable scripts to be executed in Vertec on a time-controlled basis. This functionality is cloud-ready and is available in all full-featured apps.

Regular actions can also be automated using the Task Scheduling feature provided by Windows. To allow such actions to be performed automatically and without user intervention, Vertec can be called in batch mode and then does not display a graphical interface. This procedure is explained here.

Batch Files

It is recommended to create a Windows batch file in the Vertec directory for automated actions. Although most automated features could also be specified directly as a command line in the Windows Task Planner, the detour via a batch file makes the whole thing clearer and avoids conflicts with the maximum length of a command (255 symbols).

Batch files are regular text files with the extension .bat. They contain any command line commands and can be executed in Windows by double-clicking them or by specifying their name on the command line.

A batch file for Vertec contains the following information:

<vertecpfad>\Vertec.Desktop.exe /BATCH [/SCRIPT <scriptfile> | <scriptname>]
 [/PAYSYNC] [/ADRESSENIMPORT] /USERNAME <loginname> [/PASSWORD <password>]

Legend

Information in square brackets [ ] is optional.

The pointed brackets < > in the description are used to highlight the variables in this list. In proper operation, they do not need to be written.

<vertecpfad> Path to Vertec installation. If the path contains spaces, the entire path including Vertec.Desktop.exe must be enclosed in double quotation marks.
/BATCH The /BATCH option causes Vertec to start in stealth mode, i.e. not displaying a user interface. In batch mode, the software will automatically complete after performing the specified actions.
/SCRIPT, /PAYSYNC etc. Enter the desired parameter. A list of available parameters can be found here.
<loginname> The login name of the user used to log in to Vertec.
<password>

The password of the user to log in to Vertec. The password is specified in the batch file unencrypted, so it is recommended to restrict access to the batch file accordingly.

If the login credentials were saved via Angemeldet bleiben in this user profile, the /PASSWORD option can be omitted here and the saved login will be used automatically (see next section).

Remember me

From Vertec 6.2 onwards, authentication also takes place in batch mode via the Remember me button. The desktop app generates a new AuthToken for the next login, which does not expire this way.

The procedure is as follows: The corresponding user logs into Vertec once on the server and sets the option Angemeldet bleiben. If Vertec is then started in batch mode, the user is automatically logged in.

Set up a task

On the server, there is a Task Scheduling folder in the system settings.

  1. Under Actions, click Create simple task.
  2. Type a name and, optionally, a description for the task, and then click Next.
  3. To select a calendar-based schedule, click Daily, Weekly, Monthly, or Once, click Next, specify the schedule that you want, and then click Next again.
  4. Click Start Program, and then click Next to schedule a program to start automatically.
  5. Click Browse and select the batch file created above, then click Next.
  6. Click Finish.

The task appears under Active Tasks. It can also be opened and edited by double-clicking.

To test the scheduled task, open the task and click Run.