I've tried: repeat forever get the time if the short system time is 12:00 AM then libURLDownloadToFile "ftp://[EMAIL PROTECTED]@mysite.com/testing.txt", TFlog.txt else end if
I've also tried:
repeat forever wait 5000 seconds libURLDownloadToFile "ftp://[EMAIL PROTECTED]@mysite.com/testing.txt", TFlog.txt
and: if the short system time is 12:00 AM then libURLDownloadToFile "ftp://[EMAIL PROTECTED]@mysite.com/testing.txt", TFlog.txt else repeat until the short system time is 12:00 AM
There should be a colon between user name and password in the url:
"ftp://username:[EMAIL PROTECTED]/testing.txt"
I don't think you want to use a "repeat forever" structure for this kind of thing as nothing else will run in your application. A "send <message> in <time>" will probably work better. If the download has to take place approximately every 24 hours, then something like this might do:
on onceADayDownload
put the seconds into tStart
put url "ftp://username:[EMAIL PROTECTED]/testing.txt" into url ("binfile:" & "tFlog.txt")
send "onceADayDownload" to me in tStart + 24*60*60 seconds
end onceADayDownload
Or to make sure the download takes place between 2:00 and 3:00 a.m., send every 30 minutes and check the time.
local lvDoneAlready
on onceADayDownload
put the seconds into tTime
convert tTime to dateItems
if item 4 of tTime is 2 and not lvDoneAlready then
put url "ftp://username:[EMAIL PROTECTED]/testing.txt" into url ("binfile:" & "tFlog.txt")
## check the result here and log errors if necessary
put true into lvDoneAlready
else
put false into lvDoneAlready
end if
send "onceADayDownload" to me in 30*60 seconds
end onceADayDownload
Cheers Dave _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
