<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">I offer the lines below to resolve the slow
recovery for updates when done by crontab. Restart is less than 10
seconds for first partner connection.<br>
A comment '#' is added to the shutdown crontab line and the '#'
removed after 60 seconds to prevent a reshut during first minute.<br>
Works on really old linux and the latest 22.04.1 GNU/Linux 5.15.
Not known if you can do this in Windoze, but there is a perl sed
version. Sed can never be the best solution, of course and it is
non-forgiving. <br>
Always make a backup of your crontab before experimenting. <br>
Hope you have some fun with this and please report your
experience. </font><font face="monospace"><font face="monospace">Good
or bad. </font>I hope the syntax is carried through OK via
email.<br>
<br>
73, John W1AN<br>
dxc.dxusa.net 7373 (W1DX)<br>
<br>
#Try one option at a time.<br>
# ALWAYS!! Make a backup of crontab before playing with sed !!!<br>
# Determine line number where you setup the command for Method 1.<br>
Syntax is very important here!<br>
<br>
50 * * * * run_cmd("shutdown")<br>
# Method 1<br>
# The below lines will comment and then remove the '#' after start
completes.<br>
# These below two lines act on the line number before the 's'<br>
# 50 * * * * spawn("sed -i '4s/^/#&/'
/spider/local_cmd/crontab")<br>
# 51 * * * * spawn("sed -i '4s/#//g' /spider/local_cmd/crontab")<br>
<br>
# Method 2<br>
# These two lines act on the first line containing the shutd...
command<br>
50 * * * * spawn("sed -i '0,/shutdown/s/^/#&/'
/spider/local_cmd/crontab")<br>
51 * * * * spawn("sed -i '0,/shutdown/s/#//'
/spider/local_cmd/crontab")<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font><span style="font-family:"Courier New",serif"></span>
</body>
</html>