|
I had a similar issue a while back.
Could be the default timeout, which I think is 20 seconds.
I changed to 30 - set timeout 30
We have a process that SFTP to a remote site every 15 minutes.
About 2 weeks ago, the 17:00 process started failing, consistently, every day.
I think it may have been related to all the users signoff at 17:00.
I moved the process to 16:55, issue went away.
Paul
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of DrFranken
Sent: Wednesday, September 07, 2016 3:59 PM
To: Midrange Systems Technical Discussion
Subject: expect - sometimes it runs sometimes it doesn't....
I am utilizing expect on several different servers. On one of them we need to sftp two small files up to a service periodically through the day. When I run the shell script in QSH it will run perfectly. Then I run it again and it does absolutely nothing. It may be many minutes before it will run again. Signing off and back on doesn't consistently fix it either. When submitted to batch it's the same, it may run and may not.
I am redirecting standard output to a log file (> 'output.log') and when it runs correctly everything is in it. When it does not run the file is correctly time stamped but is empty (0 bytes). Even when it's not logging it may fail, in that case if it's interactive QSH simply returns to the '$' prompt.
IBM i 7.1 with reasonably current PTFs and the latest version of expect from ScottKlement.com.
Thoughts??
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.