Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 1/5/10 1:54

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 13/8/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 1/5/10 6:30

Iritscen
Moderator
From: NC, USA
Registered: 22/10/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.


byproducts are fine, but where's the beef?

Offline

#3 2/5/10 11:08

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 13/8/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