Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline fritfald  
#1 Posted : Thursday, February 7, 2019 2:31:05 PM(UTC)
fritfald

Rank: Paid support

Joined: 1/16/2019(UTC)
Posts: 24
Denmark
Location: Aarhus

Was thanked: 1 time(s) in 1 post(s)
We have a lot of shell scripts we want to start from visualcron.

But when a script is started, and we want to have a sleep in the script for 5 min, it get a return code after 12 second...

Is there a timeout setting in SSH send text I can extend?

Here under is the output, i returns (0) after 12 seconds.

/progs/fks/b/batch/jobs/aka00200.sh aka/b/orig
Last login: Thu Feb 7 14:18:22 2019 from dgtest.foa.dk
ratata.foa.dk> is$
Thu Feb 7 14:20:39 CET 2019 nu starter programmet
nu starter de 5 min
Thu Feb 7 14:20:43 CET 2019
Thu Feb 7 14:20:44 CET 2019
Thu Feb 7 14:20:45 CET 2019
Thu Feb 7 14:20:46 CET 2019
Thu Feb 7 14:20:47 CET 2019
Thu Feb 7 14:20:48 CET 2019
Thu Feb 7 14:20:49 CET 2019
Thu Feb 7 14:20:50 CET 2019
Thu Feb 7 14:20:51 CET 2019
Thu Feb 7 14:20:52 CET 2019
Thu Feb 7 14:20:53 CET 2019
Thu Feb 7 14:20:54 CET 2019
(0)



its supposed to return af 5 min and with this text:
/progs/fks/b/batch/jobs/aka00200.sh aka/b/orig

Last login: Thu Feb 7 14:11:22 2019 from dgtest.foa.dk

ratata.foa.dk> is$
Thu Feb 7 14:14:51 CET 2019 nu starter programmet
nu starter de 5 min
Thu Feb 7 14:14:55 CET 2019
Thu Feb 7 14:14:56 CET 2019
Thu Feb 7 14:14:57 CET 2019
Thu Feb 7 14:14:58 CET 2019
Thu Feb 7 14:14:59 CET 2019
Thu Feb 7 14:15:00 CET 2019
Thu Feb 7 14:15:01 CET 2019
Thu Feb 7 14:15:02 CET 2019
Thu Feb 7 14:15:03 CET 2019
nu slutter de 5 min

i had to set it to 10 seconds to get the result i want. and not just a sudden stop and a return of (0)

If I run the script directly on the server it just writes a line for each second until the 5 min is reached.
Offline fritfald  
#2 Posted : Thursday, February 7, 2019 5:36:56 PM(UTC)
fritfald

Rank: Paid support

Joined: 1/16/2019(UTC)
Posts: 24
Denmark
Location: Aarhus

Was thanked: 1 time(s) in 1 post(s)
I figured out it got something to do with the setting:Receive timeout...

But then it takes the amount of time that the option is set to?! Really!?!
Offline Support  
#3 Posted : Friday, February 8, 2019 11:11:28 AM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,157

Thanks: 864 times
Was thanked: 440 time(s) in 418 post(s)
Try using the command option instead of send text option.
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Offline fritfald  
#4 Posted : Tuesday, February 12, 2019 8:50:45 AM(UTC)
fritfald

Rank: Paid support

Joined: 1/16/2019(UTC)
Posts: 24
Denmark
Location: Aarhus

Was thanked: 1 time(s) in 1 post(s)
If I use Command instead of send text, the environment from the Redhat server needs to be setup at the Visualcron server.

There is a lot of alias at that server. How do I setup an alias at the Visualcron environment then, I cant make that work?
Offline Support  
#5 Posted : Tuesday, February 12, 2019 2:09:23 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,157

Thanks: 864 times
Was thanked: 440 time(s) in 418 post(s)
Originally Posted by: fritfald Go to Quoted Post
If I use Command instead of send text, the environment from the Redhat server needs to be setup at the Visualcron server.

There is a lot of alias at that server. How do I setup an alias at the Visualcron environment then, I cant make that work?


Unfortunately we do not have the knowledge to provide instructions for that.

But back to sending text. What happens if send some other ommands - like sleep for 30 seconds?
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Offline fritfald  
#6 Posted : Tuesday, February 12, 2019 2:18:35 PM(UTC)
fritfald

Rank: Paid support

Joined: 1/16/2019(UTC)
Posts: 24
Denmark
Location: Aarhus

Was thanked: 1 time(s) in 1 post(s)
If Send Text is used, the timeout is simply the max connection time.

If the script is set for sleeping for 30 sec and the Timeout for Send text is 10 sec, Visualcron cuts the connection after 10 sec, regardless of what the Redhat server is doing with the script.

If the Send Text timeout is set to 60 sec, and the sleep is 30 sec in the script, then Visualcron waits for the whole 60sec regardless of that the script actually is finished after 30 sec.

So We have to use the Send Command, that actually waits for a return, regardless of the time spent of the script.
Only the connection timeout is in concern here, for the SSH connection, so its set to 86400sec.
We will try to figure out how to twerk the Environment settings.
Offline Support  
#7 Posted : Tuesday, February 12, 2019 10:39:35 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,157

Thanks: 864 times
Was thanked: 440 time(s) in 418 post(s)
Yes, I looked at the code. When using Send Text the execution is dependent on the Receive timeout because there is no way to tell when when it is done when sending text. Command channel is much different as it returns an exit code and results etc.
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Offline fritfald  
#8 Posted : Monday, February 18, 2019 10:27:43 AM(UTC)
fritfald

Rank: Paid support

Joined: 1/16/2019(UTC)
Posts: 24
Denmark
Location: Aarhus

Was thanked: 1 time(s) in 1 post(s)
Yes, but I would really like to have a better description of the setup of environment box, how to set up alias and syntax requirement and how to set ' and " and sofort.
Offline Support  
#9 Posted : Monday, February 18, 2019 3:58:30 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,157

Thanks: 864 times
Was thanked: 440 time(s) in 418 post(s)
Originally Posted by: fritfald Go to Quoted Post
Yes, but I would really like to have a better description of the setup of environment box, how to set up alias and syntax requirement and how to set ' and " and sofort.


This is the documentation we have from our vendor: https://www.secureblackb...nel_prp_environment.html
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top