Scheduling Automatic Connect/Disconnect

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
motonyc
Posts: 1
Joined: Mon Jun 06, 2022 7:39 pm

Scheduling Automatic Connect/Disconnect

Post by motonyc » Mon Jun 06, 2022 7:41 pm

Hi Everyone!

I was wondering if anyone knew of a way to have softether client disconnect and reconnect based on a schedule or task manager using batch file or something similar on Windows PC? Any thoughts would be appreciated!

Thank you!

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Scheduling Automatic Connect/Disconnect

Post by solo » Tue Jun 07, 2022 12:38 am

Easy...

Code: Select all

@echo off
path=%path%;C:\Program Files\SoftEther VPN Client
vpncmd /CLIENT localhost /CMD AccountRetrySet con-name /NUM:0 /INTERVAL:5
vpncmd /CLIENT localhost /CMD AccountConnect con-name
...and to disconnect: AccountDisconnect

Post Reply