Scheduled Microservice Execution
Microservices allow actions (queries or corrections) to be performed on devices. They can be executed in a scheduled manner through the Flows
in the Portal, allowing microservices to be executed conditionally; one such condition could be to check if a temporal condition is met.
To schedule the execution of a microservice:
- Click on the
Flows
option in the Portal, in the menu on the left. - Once there, create a new flow by clicking the
+ New
button. Or by selecting an existing flow, in case you want to modify it. - Fill in the flow fields. It is important to know whether the flow will be executed at the operating system level or at the user session level. Once the fields are filled in, click
Save
.
- Click on the
Flow
tab. - In the panel, click the
Edit
button on the right side. - To add the first condition, click
+ Add condition
. A floating panel with all available conditions will appear. SelectCron Match
.
- Add the condition check fields (how often it is checked) and the “cron” scheduling condition. Click
Save
at the bottom of the panel. In the example, the condition is checked every half hour and the “cron” condition is “every Monday at eight in the morning”.
There are many references available for checking “cron” scheduling syntax. For example: Crontab.guru
- Click the
+
button under the condition and selectAdd action
to add the microservice to be scheduled. At this point, more conditions could be added if necessary. - In the floating panel, select the microservice you want to schedule. In this example, “Clean disk”. Click the
Save
button at the top right.
In this example, the disk cleaning microservice has been scheduled to be executed every Monday at eight in the morning.
To activate the periodic execution of this microservice on the devices, it will also be necessary to configure the flow’s
Target
including reporting groups, devices, or groups of devices where execution is required.
There is also an option to notify users of the flow execution. To do this, you need to enable the option and fill in the Initial text
, Success text
, and Error text
fields.