CREATE PROCEDURE windowPeriod (IN BEGIN_TIME DATETIME)
BEGIN
DECLARE finished INTEGER DEFAULT 0;
DECLARE minuteCount INTEGER DEFAULT 0;
DECLARE END_TIME DATETIME;
DECLARE eachMinute CURSOR FOR
select count(*) as C
from
(
SELECT *
from DATA timest
我希望每30分钟安排一个python脚本。我目前正在使用计时器来运行python脚本,但是它不能精确地工作。我使用的是Linux。此代码在windows上运行良好,但在Linux上不能正常运行。它应该在半小时后触发,但在一分钟内触发。 from datetime import datetime, timedelta
from threading import Timer
j=1
while True :
x=datetime.today()
y = x + timedelta(minutes=10*j)
print(y)
我从Linux服务器telnet到windows机器以运行python脚本。该脚本将继续运行约25分钟,但由于Telnet已关闭,它始终在运行约20分钟后退出。在Linux服务器上显示"connection closed by foreign host“。
有没有办法在脚本运行期间保持会话打开?
windows上的Telnet配置:
The following are the settings on localhost
Alt Key Mapped to 'CTRL+A' : YES
Idle session timeout : Not On
Linux发行版是Red。我正在使用LoadRunner Controller的System Resources Graphs - Unix Resources监视linux计数器。监测工作正常,并实时绘制图表。但几分钟后,错误就出现了:
Monitor name :UNIX Resources. Internal rpc error (error code:2).
Machine: 31.2.2.63. Hint: Check that RPC on this machine is up and running.
Check that rstat daemon on this machin