How to set up a scheduled library sync
This topic describes how to set up the SAP Solution Manager service to run a scheduled library synchronization.
1. Using Windows Task Scheduler for on premise installations
PREREQUISITES:
- On premise Celonis Process Management is installed.
- On premise Solman Connector service installed and linked to the storage.
- PowerShell 7.0.3 or greater installed and configured in the System variable PATH.
- Administrator user for the Windows where the scheduled task is set up.
- (Optional) Windows computers can be set up to block the external scripts. In the case, set the ExecutionPolicy to "Bypass" so the script can be executed. Find more information about this process here.
1.1. Use the PowerShell script to set up the scheduled task
- Take the PowerShell script ' Localinstall-SolMan-SyncTrigger.ps1 ' from the symbio-service-solman-interface repository (scripts folder).
- Open the PowerShell console as an Administrator.
- Navigate to the folder where the script is located.
- (Optional) Run the command to set the ExecutionPolicy to "Bypass" or "Unrestricted".
-
Run the command using the given parameters:
./Localinstall-SolMan-SyncTrigger.ps1
Parameters:
- * BaseUri 8 [Mandatory] - The base Uri of your Solution Manager Connector service instance.
- TenantId [Mandatory] - The tenant id of your Celonis Process Management storage.
- ExecutionTime [Mandatory] - The time when the scheduled Library synchronization should be executed.
- Daily/Weekly [Mandatory] - Sets a task to be executed on daily/weekly basis.
- DaysOfWeek [Optional - Only needed if Weekly is selected] - Defines the day of the week for the task execution.
Examples:
Simple guided run for a daily setup:
./Localinstall-SolMan-SyncTrigger.ps1 -Daily
Full command for the daily setup:
./Localinstall-SolMan-SyncTrigger.ps1 -BaseUri "https://symbio-solman-service.net" -TenantId "298c7d61-9050-4ba7-aca9-9740f8c3a630" -ExecutionTime 9:00 -Daily
Full command for the weekly setup:
./Localinstall-SolMan-SyncTrigger.ps1 -BaseUri "https://symbio-solman-service.net" -TenantId "298c7d61-9050-4ba7-aca9-9740f8c3a630" -ExecutionTime 9:00 -Weekly -DaysOfWeek Monday,Wednesday,Friday
Update
It is possible to update your scheduled task if needed by running the script again and when prompted, confirm that you want to recreate the task.
Alternatively you can run the script again with the additional argument: -ForceReinstall
Example:
./Localinstall-SolMan-SyncTrigger.ps1 -BaseUri "https://symbio-solman-service.net" -TenantId "298c7d61-9050-4ba7-aca9-9740f8c3a630" -ExecutionTime 9:00 -Daily -ForceReinstall
Removal
To remove the task, run the script with the additional argument: -Remove
Example:
./Localinstall-SolMan-SyncTrigger.ps1 -Remove
1.2. Manually set up the scheduled task and use PowerShell script as an action
- Take the PowerShell script Trigger-SolManSync.ps1 from the symbio-service-solman-interface repository (scripts folder).
- Open the Task Scheduler in Windows and set up your task.
- As an Action select "Start a program".
- Set the Program/Script setting to use the provided script.
-
Set arguments to:
-command &{"C:\Scripts\Trigger-SolManSync.ps1" -BaseUri '/*your service url*/' -TenantId '/*your tenant id*/'}
- Confirm the action and finalize setting your task.
2. Using Azure Logic App for cloud versions
PREREQUISITES:
- Cloud version of Celonis Process Management.
- Cloud version of Solution Manager Connector service linked to the cloud Celonis Process Management storage.
For the cloud version of the Solution Manager Connector service, the Schedule mechanism is already included in the Resource Group of the service.
How to set up the scheduled synchronization
- On the Azure portal, open the Resource Group of the Solution Manager Connector service.
- Open the resource of type Logic app named "RunLibrarySync" and enable it.
- Open the resource of type Storage Account named "librarysync".
- Use the Storage Explorer to open the "SyncSchedule" table.
-
Add a new row to the table with these necessary columns:
- PARTITIONKEY: "Sync"
- ROWKEY: { your tenant id }
- INTERVALHRS: { set the repeat interval for the task in hours } (integer value)
- LASTRUNDATE: null (this column must exist, starting value is "null" but this value will be updated by the Azure Logic App)
Example
- PARTITIONKEY: "Sync"
- ROWKEY: "298c7d61-9050-4ba7-aca9-9740f8c3a630"
- INTERVALHRS: 24
- LASTRUNDATE: null
Update
To update the scheduled tasks, change the values in the Storage Account table.
Deletion
To remove the scheduled task, delete the appropriate row from the Storage Account table.