tell application "Finder" if exists disk "Shared_Vol" then else mount volume "afp://user@myserver.com/Shared_Vol" end if if exists disk "input" then else mount volume "smb://user:passw0rd@mywindowsbox.com/input" end if end tell
To run it from command line or crontab:
osascript theAppleScript.scpt