Posted on 24/02/2026 11:55:40
Hi Davy
If you can run an FTP on your remote server, you can run the CLI. The CLI runs on 'anything' - even on edge functions.
Adding a section to the docs - something like this:
Scheduling a Dynamicweb CLI Command on Windows
This article explains how to schedule a Dynamicweb CLI (Command-Line Interface) command on a Windows server using Task Scheduler and includes guidance for uploading files from a local folder into a Dynamicweb solution via the CLI.
Dynamicweb CLI is a powerful command-line tool that helps manage environments, automate tasks, work with files in the Dynamicweb solution, install add-ins, export database and files, and run queries or commands through the Management API.(doc.dynamicweb.dev)
Prerequisites
Before scheduling automation, verify:
-
The Dynamicweb CLI is installed:
npm i @dynamicweb/cli -g
or follow the CLI installation instructions.(doc.dynamicweb.dev)
-
The CLI can connect to the environment:
dw login
or use a pre-generated API key.(doc.dynamicweb.dev)
-
Your CLI command runs successfully from a normal Command Prompt.
This ensures proper authentication and configuration before scheduling the task.
Step 1: Create a Batch File
Wrap your CLI command in a .bat file to control working directory and capture logs.
-
Create a folder for scripts, for example:
C:\Scripts
-
Create a file:
C:\Scripts\dynamicweb-job.bat
-
Add the following content:
@echo off
cd /d C:\Path\To\Your\CLI
dwcli.exe sync products --env Production >> C:\Scripts\logs\dw-job.log 2>&1
Step 2: Windows Task Scheduler
Open Task Scheduler and create a new task:
-
General
-
Name the task (e.g., Dynamicweb Product Sync)
-
Select “Run whether user is logged on or not”
-
Enable “Run with highest privileges”
-
Triggers
Set schedule (e.g., daily at 02:00)
-
Actions
-
Conditions/Settings
Adjust power/network settings as required.
Provide credentials when prompted.