Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


fritfald
2019-02-07T13:31:05Z
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.
Sponsor
Forum information
fritfald
2019-02-07T16:36:56Z
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!?!
Support
2019-02-08T10:11:28Z
Try using the command option instead of send text option.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fritfald
2019-02-12T07:50:45Z
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?
Support
2019-02-12T13:09:23Z
Originally Posted by: fritfald 

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!
fritfald
2019-02-12T13:18:35Z
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.
Support
2019-02-12T21:39:35Z
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!
fritfald
2019-02-18T09:27:43Z
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.
Support
2019-02-18T14:58:30Z
Originally Posted by: fritfald 

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!
Scroll to Top