mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
52 lines
2 KiB
HTML
52 lines
2 KiB
HTML
|
<!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启动时运行"default.rc" 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 "cloud189-go sign;toybox touch /sdcard/a" 24<br>
|
|||
|
#每30天清空baidu目录<br>
|
|||
|
tcron /sdcard/b "rm -rf /sdcard/baidu/*;toybox touch /sdcard/b" 720</p>
|
|||
|
<p>可能用到的命令:<br>
|
|||
|
termux中安装remind,可配置各类提醒功能,十分强大。<br>
|
|||
|
apt install remind</p>
|
|||
|
<p>am start -n info.torapp.uweb/.wvActivity -d 'javascript:alert("remind")' #提醒<br>
|
|||
|
其中-d后面参数可以为任意url包括超微内部"i:" url。</p>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|