uweb/tcron/index.html

52 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
<title>定时脚本</title>
</head>
<body>
<header class='header'>
<a class="logo" href="/uwebzh">Home</a> <a class="logo" href="/uwebzh/tags/">Tags</a>
<nav>
</nav>
</header>
<br />
<div class="container">
<h1 class="title">定时脚本
<br>
<span class="subtitle"></span>
</h1>
<ul class="tags">
</ul>
<p>如果勾选“文件预处理”则uweb启动时运行&quot;default.rc&quot; shell脚本。可与tcron定时管<br>
理工具(<a href="i:0bhttps://cdn.jsdelivr.net/gh/torappinfo/uwebjs/bin/tcron.tgz">安装tcron</a>)配合运行定时任务,如存储清理、网页签到等。</p>
<h4 id="tcron">tcron</h4>
<p>usage: tcron logfile command hours [timezone delay_sec elsecommand]<br>
指定时间范围内如果命令没有被执行过则tcron会执行一次命令。<br>
其中logfile可以不记录任何log成功执行命令以后只需更新一下改动时间即可。<br>
hours: 每隔多长时间运行一次命令。<br>
timezone: 时区譬如“8”表示北京时间。(默认为8)<br>
delay_sec: 等待指定秒数后再执行命令,防止命令被集中执行。<br>
elsecommand: 无需执行命令command时执行。</p>
<p>ex:<br>
set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin<br>
#天翼云每天签到一次<br>
tcron /sdcard/a &quot;cloud189-go sign;toybox touch /sdcard/a&quot; 24<br>
#每30天清空baidu目录<br>
tcron /sdcard/b &quot;rm -rf /sdcard/baidu/*;toybox touch /sdcard/b&quot; 720</p>
<p>可能用到的命令:<br>
termux中安装remind可配置各类提醒功能十分强大。<br>
apt install remind</p>
<p>am start -n info.torapp.uweb/.wvActivity -d 'javascript:alert(&quot;remind&quot;)' #提醒<br>
其中-d后面参数可以为任意url包括超微内部&quot;i:&quot; url。</p>
</div>
</body>
</html>