You can use Task Scheduler in Windows to run PowerShell scripts periodically or outside business hours.
Note: While you can schedule a migration script to run while logged off Windows, it will not work with the Browser authentication method since it requires you to enter your username and password in a browser window when you run your script.
Index
Save your script as a .ps1 file
To use Task Scheduler, you will need your script in a .PS1 file format.
You can use Windows PowerShell ISE to create scripts in that format.
If you use Notepad or another plain text editor to create your scripts, you can save them as a .txt format and change the extension to .ps1 in Windows afterward.
Note: You have to import the ShareGate Migrate module in your script for the scheduling to work.
Create a scheduled task
Open Task Scheduler in Windows.
Select Create Task... in the Actions panel to the right.
Give the new task a name and description.
Set your security settings.
Note: The user account you use must be the same one licensed in ShareGate Migrate.Select the Triggers tab.
Click New...
Set the scheduling options.
Note: make sure Enabled is checked at the bottom.
Click OK.
Select the Actions tab.
Click New...
Type Powershell.exe in the Program/script field.
Type the file path of your script in the Add arguments field.
Click OK.
Review and modify the options in the Conditions and Settings tabs as needed.
Click OK.