How do I program a CGI script to execute a remote script over ssh and display data from the remote execution?
Date : March 29 2020, 07:55 AM
this will help Personally, I'd be tempted to use DBD::Proxy from ServerA with the proxy on ServerB, and get the data "directly" - allowing you to manipulate it in your CGI script. Of course, this assumes the data you need comes back quickly enough not to time anything out.
|
Execute remote bash with ssh together with a local script, that, when ends, will kill the remote execution
Date : March 29 2020, 07:55 AM
should help you out I logged with ssh on the server with public key (no password). , Found the solution: ssh user@ip "cd path && ./bash0.sh parameter1 paramter2" &
/bash1.sh <-- starting local bash
ssh user@ip pkill bash0.sh
|
R- Get script to run every X minutes regardless of execution time.
Tag : r , By : Phil Austin
Date : March 29 2020, 07:55 AM
like below fixes the issue I have a function of variable execution time, but is going to be under 20 seconds for most use cases. I want a script to execute the function every 10 minutes regardless of how long the function actually takes (therefore cannot use the sleep command or any 'wait' command) , in your loop: p1 <- Sys.time()
yourFunct()
theDelay <- 600-as.numeric(difftime(Sys.time(),p1,unit="secs"))
Sys.sleep(max(0, theDelay)
|
How to reduce execution time of this script (Google app script timeout)
Date : March 29 2020, 07:55 AM
it should still fix some issue I have this piece of script. It filter a range by a criteria, then It copy values that respect criteria in a specific sheet then It deletes all the row in the original sheet that respect the criteria. So that If my range contains more than 1000 rows, It's said to me error: Google app script timeout. , You might try this: var data = sourceData.getRange(1, 1, lastRow, 5).getValues();
var chiave = response.getResponseText();
for(var i=0;i<data.length;i++)
{
if (data[i][0] == chiave)
{
//var filteredRow = sourceData.getRange(i+1,1,1,5).getValues();
destinationData.appendRow(data[i]);
}
}
|
Google app script timeout ~ 5 minutes?
Date : March 29 2020, 07:55 AM
|