AH!
Well, I would do a few things here first.
1) Modify the shell script on the server to not only copy the file, but compress it. My guess is that the .sql file is a big text database with some code here and there, but text none-the-less. Should crunch down nicely with gzip. If your script on the server times out, have it detach the process with the & sign.
2) On your mac, create a crontab inside the terminal for the user. Crontab formats look like this:
[CODE]
SHELL=/bin/bash
TERM=xterm
MAILTO=emailbox
# This is a sample Crontab
# Written just for Dani by Christian
# Don't tell Tek, as he may get jealous
# MI HH DD MO DAYOFWEEK Sun=0
# Run something on Monday at 5:10am, every Monday
10 5 * * 1 (mondaytask.bat > /dev/null)
# Get her file from her server trigger
# Run Sun, Tue, Thur, Sat at 1:25 am
25 1 * * 0,2,4,6 (filemaint commands... delete old?)
27 1 * * 0,2,4,6 (copyfromserver.bat > /dev/null)
# END OF Crontab
[\CODE]
Now, she is going to need that batch script. I found a neat thing called expect to handle this on my side.
[CODE]
#!/usr/bin/expect
#
# This is expect script copyfromserver.bat
# It uses the expect code to prompt for usernames and passwords
###
# Prerequesites
#
# We assume that the file exists on a server, and the password will remain static.
# We assume that the local file has been deleted before this script executes
###
# Revision 0: Initial deployment
# Expect has a timeout. We need to eliminate it.
# Might create a process problem if network issues arise.
set timeout -1
spawn scp remoteaccount@remote domain:/path/filename /local/path/filename
send "\r"
expect "password:"
send "password\r"
expect "]"
[\CODE]
Note that the \r means returns, and they have to be in the send command. Also, the last expect character should be what your system uses... my linux box has a ] near the end of the prompt. Also note that the #!/usr/bin/expect command has no spaces in there, and your local installation of expect may be in a different path.
Make these text files readable to root user only, so that other accounts cannot see the unfortunate cleartext password stored there.
Christian