Choose where an automation job should run

A storm disconnects several food distribution depots from headquarters while a maintenance task is scheduled to protect their local scanning systems. The depots still handle deliveries, but the central controller can no longer reach them. Where should the automation run, and wha…

A storm cuts the wide-area connection to a regional food distributor's smaller depots. The depots can still scan incoming shipments and keep local records, but their central management service is unreachable. At one location, the disk that holds the scanning application's temporary files is filling. A routine cleanup job is scheduled at headquarters for midnight. The depot manager asks whether the local system will be able to perform the job without headquarters. The answer depends on a design decision made long before the storm: where does the automation actually run?

There are good reasons to run work from a central controller. It can coordinate a change across many depots, maintain a controlled inventory, enforce approvals, and collect evidence that an operation completed. There are also tasks that must continue on a machine when the central connection disappears. A local process can inspect its own disk, confirm that an archive is closed, and make a bounded housekeeping change without waiting for a remote session. Neither design is automatically safer. Each puts a different part of the job behind a different failure boundary.

In this illustrative company, the scheduled task was written by a central operations team. They refer to it as a remote cleanup job, but that phrase hides several possible execution models. The controller might connect to each depot machine and ask that machine to perform the work. It might call a management service that acts on behalf of the depot. It might run a script at headquarters that accesses a remote file share and manipulates data across the network. Or the depot might have its own scheduled task and merely report the result to headquarters. These arrangements can all appear on a management screen as one job. They have very different behavior when a link fails.

The AutoOps+ study guide from Bare Metal Cyber offers an optional follow-up for comparing locally executed work with centrally managed operations. Use the depot example to ask which facts the job needs, where those facts live, and which decisions must remain possible when the network is unavailable. Those questions give the technical terminology an operational purpose.

The first question is what information and authority the operation needs. To reclaim safe space, the job must know which temporary files are no longer in use and whether their contents have already been committed to the depot's business record. If that knowledge lives only in the local application, the machine hosting the application may be the best place to make the decision. Sending filenames to headquarters for approval and then waiting for a remote instruction could leave the application stranded during the storm. Conversely, deleting completed files from a central archive without consulting the authoritative retention policy would be a poor choice regardless of the script's location.

A local job can examine local facts without a network round trip. It still needs clear limits. The depot's scanner may be holding files for orders that have not yet synchronized to headquarters. Those records are not disposable simply because they are old or large. The cleanup task should distinguish recoverable temporary material from the records that support deliveries, financial reconciliation, and accountability. When the safe condition cannot be established, the job should leave the uncertain files alone and alert the local operator. Saving disk space by destroying untransmitted records would turn a connectivity problem into a business loss.

Now imagine that the central controller does reach the depot just before midnight. A remote job can still mean that code executes on the depot. In a common automation pattern, the controller establishes a management connection, transfers or invokes the necessary operation, and receives a result. The script does not have to process the depot's files at headquarters. The work can happen where the data and the relevant operating-system facilities reside, while coordination stays central. That is an important distinction: the location of the person who starts a job is not necessarily the location where its instructions execute.

Some tasks should genuinely run at the controller. Updating a central inventory record, asking a cloud management interface to create a resource, or generating a fleet-wide report might not require a command on each depot server. In those cases the controller holds the relevant authority and talks to a central service. Making twenty remote servers each call the same central system could create twenty copies of a change that should happen once. The best execution location follows the authoritative object being changed, not the location of the administrator's keyboard.

Consider an employee access change. If the required operation is to disable a central identity account, the controlled request may belong at the identity service. Running an account-disabling script on every depot computer could only affect local accounts, or might produce inconsistent results if those computers are offline. On the other hand, stopping a local print service is a machine-specific operation. A remote controller can request it, but the service control must be performed in the environment that hosts that service. Clear separation prevents teams from claiming a global change is complete after only local pieces have been updated.

Authority is the next boundary. A controller that can administer every depot is a powerful target. Compromise of that machine, its credentials, or its job definitions can multiply a mistake across the fleet. A local agent or scheduled service also has privileges, but its rights can be limited to specific work on one host. Localizing execution may reduce the reach of an individual credential, although distributing powerful long-lived credentials to every depot can make the overall design worse. Good automation asks what each identity may do, on which machines, and for how long. Moving the same unrestricted administrator account from headquarters to every depot does not create least privilege.

There is also a difference between the script's execution environment and the target it affects. If a job runs on a controller and invokes a cloud service, it depends on the controller's software libraries, credentials, network reachability, and configuration. If it runs on each depot host, it depends on that host's operating system, local permissions, installed components, and current workload. A job tested on one central machine may fail on a depot because a required interpreter is missing or an application service uses another account. A locally scheduled task can succeed on one depot and fail at another because the two machines have drifted apart. The portability of the script does not erase the differences in its surroundings.

That observation changes the test plan. For a centrally executed operation, test the controller's ability to reach the service, the scope of its credentials, and the result of the service-side change. For work executed on target machines, test the target environment, the privileges of the actual runtime identity, and the local side effects. Also test a lost connection during the operation. A controller timeout might mean the remote task never started, or it might mean the task completed after its reply was lost. Those outcomes demand different recovery decisions. The connection result alone is not a reliable completion record.

The depot's storage job makes this concrete. Suppose headquarters requests that the depot compress a closed archive. The machine finishes writing the archive, but the network drops before it returns confirmation. Headquarters sees a timeout and proposes sending the same command again when the link comes back. That may be harmless if the operation recognizes an already completed archive and verifies the expected result. It may be destructive if the second invocation treats the output of the first as fresh input and overwrites material still needed for reconciliation. An operation should leave an identifiable local result and define safe repeat behavior, regardless of where it was started.

The Bare Metal Cyber Academy's AutoOps+ transcripts can serve as an optional reference after listening, especially when you want to compare which part of a workflow belongs to a controller and which part belongs to a managed machine. A useful mental exercise is to move one task from a central run to a local schedule and list what becomes more resilient, what becomes harder to approve, and what evidence must travel back afterward. The answer should change as the task changes.

One common response to this problem is to place a small local maintenance component on the depot system. That component is given a narrow responsibility: check the specific application directory, recognize files the application has declared safe for cleanup, preserve business records, and produce a local result. It does not carry the authority to rewrite headquarters policy. Headquarters distributes an approved policy when the depot is connected. The depot can then execute the bounded maintenance while disconnected and later report what happened. This design does not require every depot to make broad independent choices, and it does not pretend that central approval will always be reachable at the moment of execution.

Offline execution introduces the problem of policy age. Suppose headquarters changes its retention requirement while the depot is cut off. The local machine may still hold the previous policy. For ordinary housekeeping, an explicitly allowed grace period might be acceptable. For a destructive operation with a legal retention consequence, the safer design could be to stop when the policy is no longer valid and retain the records until communications recover. A local scheduler should know which decisions are permitted under stale policy and which need fresh authorization. The right behavior is defined by the business risk, not by a universal preference for autonomy.

The controller also needs a way to distinguish missing evidence from failed work. If a depot has not checked in since the storm, headquarters cannot legitimately mark its cleanup as successful. It should record an unknown state. When communications return, the local machine can report a job identifier, approved policy version, time of execution, eligible files, result, and exceptions, with appropriate protection for any sensitive details. That lets the operations team reconcile what happened instead of blindly replaying every missed job. A centrally visible green status should mean the required evidence arrived and was checked, not merely that the scheduler issued a request.

This is different from allowing a depot to ignore central control indefinitely. The organization still needs approved changes, versioned job definitions, monitoring, and a way to revoke unsafe automation. An autonomous local job needs bounds on its authority and an expiry or suspension rule where the risk demands one. Once reconnected, it needs a disciplined process for receiving current policy rather than abruptly running a backlog of old tasks. A sudden flood of deferred operations can be more damaging than the outage that delayed them.

There are practical resource tradeoffs as well. A heavy scan run from headquarters might saturate the link if it reads whole remote archives across the network. The same computation performed at the depot can send back only a compact result. But running intensive maintenance on the depot during its busy receiving window could slow the scanner application and disrupt the business. Centralized scheduling may manage those windows better; local workload awareness may be needed to postpone the actual work. A system can keep its coordination central while placing the expensive processing where the data lives.

Another example changes the preferred location. A company needs to update the standard network access policy for all its depots. That change affects shared security boundaries and requires organization-wide review. It is inappropriate for each isolated depot to invent its own policy simply because the controller is unreachable. The team should stage the approved policy centrally and apply it under controlled conditions when the site can safely receive it. Local autonomy belongs to well-defined tasks, not to every change an administrator might want during an outage.

Remote and local execution also have different failure modes at the end of a job. A script launched interactively might stop when the user's session ends if it is not hosted by an independent service or scheduler. A local service can continue under its own lifecycle, but then it must report failures that no interactive operator is present to see. A centrally coordinated remote execution may offer useful audit trails, but those records can be incomplete if the connection drops. The team needs durable evidence at the place where the operation can actually confirm its result, followed by reliable delivery of that evidence to the people responsible for the fleet.

The distinction becomes sharper when you separate a decision from the action that implements it. Headquarters can decide that completed temporary archives should be compressed under a named retention policy. The depot machine can decide whether a particular file satisfies the policy using its current application state. Headquarters can evaluate the report and investigate anomalies. This division avoids both extremes: a fragile central controller that must personally observe every local detail, and an ungoverned collection of machines making permanent business decisions without supervision.

Back at the food distributor, the local cleanup process discovers that the files consuming the disk are closed diagnostic archives, not unsynchronized delivery records. For the diagnostic archives covered by the local retention policy, it has enough free working space to create and check compressed copies. It verifies those copies before removing the redundant uncompressed versions, records each completed action, and leaves unsynchronized shipment records untouched. The depot regains capacity and continues receiving shipments during the outage. When the wide-area connection returns, headquarters receives the record, confirms the approved policy was used, and identifies two depots whose jobs did not run because their local service was disabled. Those machines receive targeted attention instead of an indiscriminate fleet-wide retry.

Choosing where an automation job should run begins with where its authoritative facts, privileges, and dependencies reside. Central execution is valuable for coordinated decisions and global visibility. Execution on the target can provide resilience, local context, and less unnecessary data movement, but it must carry bounded authority and its own error reporting. A reliable design does not confuse the scheduler with the worker or the request with the result. It chooses an execution boundary that still permits the required decision when the easy connection disappears.

Choose where an automation job should run
Broadcast by