Skip to main content

Documentation Index

Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Script management is the right tool when you need direct RouterOS control across one or more sites. SDX wraps scripts in an operational lifecycle so changes can be tested, scheduled, authorized, delivered through the device job plane, and audited afterward. Use scripts for device configuration tasks that are easier or more precise in RouterOS than in a workflow node.

Prerequisites

Before you schedule a script, make sure you have:
  • Permission to create and manage scheduled scripts.
  • At least one adopted site that can receive jobs.
  • A script that has been reviewed for RouterOS version compatibility.
  • A test site for validation.
  • An authorization path for production execution.

Script Lifecycle

Create And Run A Scheduled Script

1

Create the script

Go to Scripts, open Scheduled Scripts, then create a scheduled script. Give it a description that will still make sense in an audit trail later.
2

Select targets

Choose the sites that should receive the script. Keep the first rollout small unless the script is already proven.
3

Add script content

Write the RouterOS script directly or start from a template. Keep scripts idempotent so retries or partial rollout recovery do not create duplicate configuration.
4

Choose timing

Set the launch time. For production changes, align it with your maintenance window.
5

Run a test

Run the script against a test site before scheduling the wider rollout.
6

Request authorization

Move the script through the authorization flow before production execution.
7

Monitor outcomes

Watch each site outcome after launch. Investigate failed outcomes through site logs and orchestration history.

Templates

Templates help you standardize repeatable scripts. Use templates for tasks your team performs more than once, such as:
  • Adding common firewall rules.
  • Updating service settings.
  • Capturing diagnostic state.
  • Applying a known workaround.
  • Building version-aware script fragments.
Treat templates like production code. Name them clearly, review changes, and test before broad deployment.

AI-Assisted Script Drafting

AI can help draft RouterOS scripts from a natural-language prompt. Use it to speed up first drafts, not to skip review. Before running an AI-generated script:
  1. Read every command.
  2. Check whether it could remove access, disable services, delete configuration, or change routing.
  3. Test it on a non-critical site.
  4. Confirm the resulting device state is what you intended.
  5. Use the normal authorization flow for production rollout.
Never deploy an AI-generated RouterOS script directly to production without human review and a test run.

Best Practices

Keep scripts idempotent

Check whether objects already exist before adding them. Avoid scripts that fail or duplicate state on a second run.

Use narrow targets first

Prove behavior on one test site, then a small cohort, before a fleet-wide launch.

Prefer templates for repeat work

Templates reduce copy-paste drift and make operational procedures easier to review.

Read outcomes, not just launch state

A launched script is not the same as a successful script. Review each site result.

Configuration backups

Create rollback points and compare device state before or after script changes.

Operational model

Understand how SDX delivers jobs to routers.