Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 05/01/10 01:05

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 08/13/08

Mac Scripting Question

Look, guys, I need to reset VPN connection automatically every 23 hours. How can it be done?


Jente, du er deilig, du er lekker, ihvertfall nå når jeg drikker.
Baby, du har det som trengs, hva er sannsynligheten for at vi to hopper til sengs?
Kan du si meg det? Jeg er ikke så stø i sannsynlighetsregning.

Offline

#2 05/01/10 06:05

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac Scripting Question

Sounds like you need to start with a crontab or launchd in order to schedule a task; launchd is supposed to be used these days, not cron.  You set up tasks for launchd by making .plists.  See man pages for "launchd" ("Files" section) and "launchd.plist".

The task you schedule needs to call a bash script or AppleScript (through "osascript") to perform whatever is needed to reset the connection.  Look for com.apple.FolderActions.folders.plist in your local LaunchAgents folder for sample "code".

But I don't know anything about the actual VPN deal because your Internet setup is strange and foreign to me, so I can't tell you what commands to use.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#3 05/02/10 11:05

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 08/13/08

Re: Mac Scripting Question

well, I did that thru arse with automator...


Jente, du er deilig, du er lekker, ihvertfall nå når jeg drikker.
Baby, du har det som trengs, hva er sannsynligheten for at vi to hopper til sengs?
Kan du si meg det? Jeg er ikke så stø i sannsynlighetsregning.

Offline

Board footer

Powered by FluxBB