FTPPutFile as well as other FTP statements do not allow timeout configuration. 24x7 uses default timeouts for your Window system. A workaround for this problem is to use the following code: //////////////////////////////// // use 30 seconds timeout Dim my_timeout, number, 30 Dim time1, number Dim time2, number Dim time_diff, number Dim is_timeout, boolean // set timer Timer 0, time1 // set timeout error handling OnErrorGoto CHECK_TIMEOUT DO_FTP: // ftp file FTPPutFile .... // if we are here the file was processed succefully. // Now we can exit or process other files... OnErrorStop Exit CHECK_TIMEOUT: // timeout error handling here // Get timer Timer time1, time2 // calculate elapsed time in seconds Divide time2, 1000, time_diff // decrease timeout interval Subtract my_timeout, time_diff // now check if we still have time - if yes, restart FTP IsLess my_timeout, 0, timed_out IfThen timed_out, FAIL GoTo DO_FTP FAIL: RaiseError "Timeout. My FTP job failed." //////////////////////////////// : Hi, : I'm receiving timeout errors when using FTPPutFile. The timout takes ages to : occure with is not acceptale. : How can I configure timeout value used by FTPPutFile. : I'm using 24 x 7 Scheduler Version 3.3.2 : Regards, : Drake
|