Cinchy Automations
Cinchy Automations and the Cinchy Scheduler were added to the platform in v5.11.
Cinchy Automations is a platform tool that allows users to schedule various tasks along a configurable frequency. To reduce the time and manual effort spent on reoccurring tasks, you can now tell Cinchy to perform the following automatically:
- Executing queries
- Triggering batch syncs
- Extracting and running a code bundle, which can contain any number of queries or syncs needed to perform a task.
Using the Automations capability, you can also build an automation that performs multiple tasks in sequence (known as "Automation Steps") to allow for more complex use cases.
Prerequisites
- Cinchy Automation and Scheduler only works on a Kubernetes deployment of the platform.
- Customers on IIS are recommended to use Windows Scheduler for their use case
- Cinchy v5.11+ is required.
Important Terms
- Automation: A bundle of 1 or more steps that are executed via the Cinchy Scheduler, on-demand, or manually.
- Automation Steps: A step denotes an individual task that will be performed. Ex: Executing a function can be one step.
- Automation Package: A package is a way to group Automations together either under a domain or a data product. For example, Automations related to Sales Leads might be packaged under a "Leads Analysis" package.
- Schedules: The reoccurring frequency in which an Automation is run. This can be minutes, hours, bi-weekly, etc. Schedules use Debian Cron syntax.
Workflow
The general workflow of creating an automation is:
- Define your outcome. This can be the execution of a query, the triggering of a batch sync, or the running of a code bundle. Once you have defined this, you must create the appropriate objects (i.e. create your query, configure your data sync, or prepare a code bundle zip file.)
- (If required) Create your Automation Package via the [Cinchy].[Automation Packages] table. You may not need to create a new package for every Automation.
- Create your Automation via the [Cinchy].[Automations] table.
- Create your Automation Step(s) via the [Cinchy].[Automation Steps] table. Each Automation needs at least 1 step.
- Enable your Automation.
- Track your Automation execution via the [Cinchy].[Automation Execution History] table and the [Cinchy].[Automation Steps Execution History] table.
New Objects
The following objects are automatically deployed to a v5.11+ Cinchy platform.
The breakdown of each individual table column can be found in Appendix A.
Object Name | Object Type | Description |
---|---|---|
Automations | Table | This table houses all of the Automations in your environment. |
Automation Steps | Table | This table houses all of the steps that make up the various Automations in your environment. |
Automation Packages | Table | The Automation Packages table is used to group Automations together by which domain/data product they belong to. |
Schedules | Table | You can set your Automation to run on a scheduled frequency, and these schedule options are housed in this table. It comes pre-loaded with a variety of common frequencies and you have the ability to add in others as needed. |
Durations | Table | The durations table is used when configuring the Max Execution Time and SLA columns within the Automations table. It comes pre-loaded with a variety of common durations and you have the ability to add in others as needed. |
Automation Execution History | Table | This table can be used to review the execution history of your Automations, including any exceptions that may occur. |
Automation Steps Execution History | Table | This table can be used to review the execution history of individual steps, including any exceptions that may occur. |
automations@cinchy.com | User | This user account is used to trigger Automations. All steps are run under this user unless a PAT is specified when building the automation. |
cinchy_automations | Integrated Client | The Automations integrated client is used when authenticated your Automation tasks, as required. |
Create an Automation
This section will guide you through the creation of an example Automation.
Example use case: To monitor for project risk levels, you combine the following query and data sync to run daily:
- A saved query is executed on a [Project] table that updates a "Risk" column based on the number of days between the current date and a "Project Due Date" column.
- A data sync runs and filters for any rows with the "Risk" column set to high. It syncs the filtered data into an [Urgent Tasks] table.
Create Objects
The example objects used in this scenario are:
- A saved query, ex: "Due Date Risk"
- A data sync, ex: "Project > Tasks sync"
Create the Package
For this example we will be creating a new Automations Package to hold the Automation.
- Navigate to the [Cinchy].[Automation Packages] table.
- Insert the following data in a new row to create the package:
- Name: Project Management
- Description: Contains the Automations related to projects.
- Domain: Product
Create the Automation
- Navigate to the [Cinchy].[Automations] table.
- Insert the following data in a new row to create the automation:
- Package: Project Management
- Name: Project Risk Automation
- Description: This automation helps monitor the risk level for projects
- Enabled: Set this to false/unchecked until you are ready to start the Automation
- Schedule: At 1am every day
- Schedule Strategy: Cinchy Scheduler
- Concurrency Policy: Ignore
- SLA: 1 hour
- Max Execution Time: 30 minutes
If needed, you can create a new schedule value in the [Cinchy].[Schedules] table.
If needed, you can also create new SLA and/or Max Execution Time values in the [Cinchy].[Durations] table.
Create the Automation Steps
- Navigate to the [Cinchy].[Automation Steps] table.
- Insert the following data in a new row to create the first step:
- Automation: Project Risk Automation
- Sequence: 1
- Description: Sets the risk level of the project based on number of days until due date.
- Saved Query: "Due Date Risk"
- SLA: 1 hour
- Max Execution Time: 5 minutes
- Repeat with another row to create the second step:
- Automation: Project Risk Automation
- Sequence: 2
- Description: Syncs at risk projects into the tasks table.
- Data Sync Configuration: "Project > Tasks sync"
- SLA: 1 hour
- Max Execution Time: 10 minutes
At this point, you can return to the [Cinchy].[Automations] table and enable your Automation.
As needed, refer to the [Cinchy].[Automation Execution History] and [Cinchy].[Automation Steps Execution History] tables to monitor the execution of your Automation.
Appendix A - Table Columns
This section breaks down the column definitions for certain tables used in the Automations process.
Automation Packages Table
Column Name | Column Definition | Example |
---|---|---|
Name | Mandatory. A unique name for the package. | Project Management |
Description | A description of the package. | Contains the Automations related to projects. |
Domain | Mandatory. The domain where your package is contained. | Product |
Automations Table
Column Name | Column Definition | Example |
---|---|---|
Package | Mandatory. Select the package you want to group your Automation under. This column links to the [Cinchy].[Automation Packages] table. | Project Management |
Name | Mandatory. The name of your Automation. | Project Risk Automation |
Description | A brief description of your Automation. | Sets the risk level of the project based on number of days until due date. |
Enabled | Sets whether the Automation will execute or not. | Enabled |
Schedule | Mandatory. Sets the frequency at which the Automation will execute. | At 1am every day |
Schedule Strategy | Mandatory. Sets how the Automation is executed. This value is either: - Cinchy Scheduler (will be executed automatically based on the frequency configured above) - Manual (a non-query/sync/code bundle task that a user is notified to execute manually) - Run on Demand (a query, sync, or code bundle that a user is notified to execute manually) | Cinchy Scheduler |
Concurrency Policy | Mandatory. Sets how the scheduler handles concurrent executions of the Automation. This can be either: - Ignore: Proceed with the new Automation independently of the previous one. - Wait: Delay the new Automation until the previous one completes. This ensures a sequential execution. - Skip: Bypass the new Automation if a previous one is running. | Ignore |
SLA | Mandatory. The Service Level Agreement associated with the Automation. This value is linked from the [Cinchy].[Durations] table. | 1 hour |
Max Execution Time | Mandatory. The maximum amount of time the Automation will run before aborting execution. This value is linked from the [Cinchy].[Durations] table. | 30 minutes |
Automation Steps Table
Column Name | Column Definition | Example |
---|---|---|
Automation | Mandatory. Select the Automation that this step will execute as part of. This column links to the [Cinchy].[Automations] table. | Project Risk Automation |
Sequence | The order in which the step will take in the Automation. A sequence value of "1" will execute first. Note: If no sequence is set (or multiple steps are set to the same sequence), the Automation will run the steps in alphanumeric order based on the Description value. | 1 |
Description | A brief description of your Automation Step. | Runs the "Due Date Risk" query. |
Data Sync Configuration | If the step runs a batch sync, enter the name of the data sync here. This value links to the [Cinchy].[Data Sync Configurations] table. | "Projects > Task sync" |
Saved Query | If the step executes a query, enter the name of the saved query here. This value links to the [Cinchy].[Saved Queries] table. | "Due Date Risk" |
Code Bundle | If the step extracts and runs a code bundle, attach the .zip file here. | RiskManagement.zip |
Code Bundle Command | If the step uses a Code Bundle, you must specify a command to execute it. This value expects a linux command (Ex: Powershell/Python/Bash) | |
Personal Access Token | By default, Automation Steps are run as the admin-level Automation user account. If desired, you can instead specify a Personal Access Token for an account you want to run the step instead. The PAT must be configured as a secret in the [Cinchy].[Secrets] table first. Note that the PAT user must also have the entitlements to run the query/execute the data sync, if necessary. | PAT1 |
Continue on Failure | Setting this value to true will tell the Automation to continue with subsequent steps in the sequence even if this specific step fails to execute. | False |
SLA | Mandatory. The Service Level Agreement associated with the Automation Step. This value is linked from the [Cinchy].[Durations] table. | 1 hour |
Max Execution Time | Mandatory. The maximum amount of time the Automation Step will run before aborting execution. This value is linked from the [Cinchy].[Durations] table. | 10 minutes |