If you want to automatically restart or shut down io.Connect Desktop on a schedule, for example, a nightly restart to free up resources, here’s how:
Built-In Scheduled Restart & Shutdown (io.Connect Desktop 9.4+)
Since io.Connect Desktop 9.4, you can schedule periodic restart or shutdown of the platform directly from the launcher UI.
To configure this:
- Open the io.Connect Desktop launcher.
- Go to the Settings section.
- Configure your desired periodic restart and/or shutdown times.
This is the simplest approach and requires no custom code.
Legacy Workaround: Invoking the Restart Interop Method (Pre-io.connect Desktop 9.4)
Before the built-in scheduling feature was available, the recommended approach was to create a hidden service application that invokes the T42.ACS.Restart Interop method on a schedule:
await glue.interop.invoke("T42.ACS.Restart");
This approach still works and can be useful if you need a custom restart workflow in older versions of the platform.
Programmatic Restart via the Platform API (io.Connect Desktop 10/0+)
If you need more control — for example, restarting from a custom service app on a specific schedule, or including custom logic before the restart — you can use the Platform API.
Note: The
io.platformAPI is available since io.Connect Desktop 10.0.
The io.platform.restart() method restarts the io.Connect platform programmatically. It accepts an optional ExitOptions object with the following properties:
autoSave(boolean) — whether to persist the current Global Layout before restarting.showDialog(boolean) — whether to show a dialog to the user during the restart.reason(string) — a reason for the restart.
Example:
const options = {
autoSave: true,
showDialog: false,
reason: "Scheduled platform restart."
};
await io.platform.restart(options);
You can use this from a hidden service application that runs on a schedule to achieve a nightly restart.
Similarly, io.platform.shutdown() is available if you want to shut down the platform instead of restarting it.