Automate a sequence of projects

While Lokad does its best to perform operations as fast as possible, many operations take several minutes or even more to complete. Therefore, in order to avoid keeping you waiting while the results are being computed, Lokad provides scheduling capabilities to auto-trigger processes on a scheduled basis. In addition, the process sometimes requires a whole sequence of operations to be performed in the correct order. As a result, Lokad also offers orchestration capacities to define a sequence of operations to be executed.

Project sequences

With a Lokad account, multiple types of projects can be created. In particular, it is possible to create a project sequence by clicking:

Image

This type of project can be configured for both scheduling and orchestration purposes. Once the new project is created, click Edit to start modifying your project.

Image

Configuring an automated run

The sequence project can be executed either manually - by clicking Run like any other project - or automatically through its own execution schedule. By default, when a sequence project is created, the scheduled execution is disabled. In order to enable the scheduled execution, two options are available: you can check the Scheduled or the On file changes box and then click Save.

Setting a schedule

When using a time schedule, it is possible to choose between two types of frequencies (either daily or weekly) and to define the time and the applicable time zone. The time should be entered as a 24h entry (aka 13:00 is 1PM).

We typically suggest to have a master sequence that is executed every night (after midnight in the dominant time zone business-wise). This sequence starts with refreshing the data - assuming that Lokad has a data connector - and ends with the various reports. This pattern ensures that you get “fresh” Lokad numbers every morning.

Image

Setting a trigger based on file changes

Alternatively, a file upload can be used to trigger the sequence run. File paths must begin with / and the file name can contain one * wildcard. Subfolders of the specified path are not taken into account.

This sequence scheduling can support several trigger patterns, meaning that the sequence will run each time a file corresponding to one of them is uploaded or updated. If a sequence is intended to run every day at the end of an FTP transfer of a series of files, we suggest to use the last file of the FTP list (possibly a dummy file) as trigger path.

Image

Configuring the orchestration

Once the new project sequence has been created, it is possible to define the actual sequence of projects to be executed. First, you need to select the project to be part of the sequence. This can be achieved by clicking the button Add projects. The sequence mode of execution can be set to Sequence or Parallel.

Image

Each project comes with a few settings: