Start and Close a OpenVPN Connection via Scheduled Task

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Sherlock
OpenVpn Newbie
Posts: 2
Joined: Fri Aug 29, 2014 10:23 am

Start and Close a OpenVPN Connection via Scheduled Task

Post by Sherlock » Fri Aug 29, 2014 10:47 am

Hello everbody,

as you can see in the subject ive to create a scheduled task to open and close a OpenVPN Connection.

First of all: I use a Microsoft Operation System

When i open the OpenVPN Connection via Scheduled Task the Application is hang on, i dont get a connection to the destination.

The Scheduled Task have this configuration in Action:

Program/script: "C:\Program Files\OpenVPN\bin\openvpn-gui.exe"
Arguments: --config_dir "C:\Program Files\OpenVPN\config\" --connect openvpn.ovpn

The task is running, but nothing more is happen after the start time.

On Windows Task Manager i see following processes:

openvpn.exe
openvpn-gui.exe

It looks like both Proccesses are stand still, there is no activity in CPU or Memory.

Can someone tell me how im able to open and close a OpenVPN Connection automatically via Scheduled Task?

Thanks a lot

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Start and Close a OpenVPN Connection via Scheduled Task

Post by maikcat » Fri Aug 29, 2014 12:10 pm

i dont see a reason why not on calling openvpn directly....

why do you want the gui to start?

Michael
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

Sherlock
OpenVpn Newbie
Posts: 2
Joined: Fri Aug 29, 2014 10:23 am

Re: Start and Close a OpenVPN Connection via Scheduled Task

Post by Sherlock » Mon Sep 01, 2014 10:37 am

Hi maikcat,

got a workaround for me: i use the autoconnect when the openvpn connection is disconnect temporally by ISP.

Thanks a lot

Post Reply