add crontab example to sign in automatically

This commit is contained in:
James Feng Cao 2023-11-23 10:08:41 +08:00
parent 36182a2a88
commit 12b3563708
6 changed files with 111 additions and 120 deletions

View File

@ -11,7 +11,7 @@
<sitemap>
<loc>zh/sitemap.xml</loc>
<lastmod>2023-11-14T09:24:14+08:00</lastmod>
<lastmod>2023-11-23T10:07:09+08:00</lastmod>
</sitemap>

View File

@ -6,8 +6,39 @@
<description>Recent content in _posts on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Thu, 23 Nov 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="/zh/_posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>定时脚本</title>
<link>/zh/tcron/</link>
<pubDate>Thu, 23 Nov 2023 00:00:00 +0000</pubDate>
<guid>/zh/tcron/</guid>
<description>crontab 注意1. 必须使用单一空格作为分割符。
2. 必须同时满足日期及星期的要求功能增强crontab标准只要求满足其中一个要求。
文件&amp;quot;crontab&amp;quot;自动签到例子:
5 8,9 * * * i:a1http://m.bookschina.com/ActityDaily/AvSignIn
7 9 * * * i:a1http://m.bookschina.com/ActityDaily/AvSignInTakeQuan
6 9 * * * i:a1http://m.bookschina.com/UserCenter/SignInApi?action=SignIn
8 9 * * * i:a1http://m.bookschina.com/UserCenter/SignInAward?index=1
其中&amp;quot;i:a1&amp;quot;为对url发起&amp;quot;post&amp;quot;请求。
tcron 如果勾选“文件预处理”则uweb启动时运行&amp;quot;default.rc&amp;quot; shell脚本。可与tcron定时管
理工具(安装tcron)配合运行定时任务,如存储清理、网页签到等。
勾选“文件预处理”的情况下,如果存在文件&amp;quot;default.rc2&amp;quot;,则在超微浏览器成为前台时,此文件代码被执行。在超微永不退出的情况下,&amp;quot;default.rc&amp;quot;将没有任何执行机会,而&amp;quot;default.rc2&amp;quot;保证即使超微长时间不重启,定时脚本仍可以执行。
usage: tcron logfile command hours [timezone delay_sec elsecommand]
指定时间范围内如果命令没有被执行过则tcron会执行一次命令。
其中logfile可以不记录任何log成功执行命令以后只需更新一下改动时间即可。
hours: 如果为正整数,则将每天划分为不同的时间区间(单位小时),每个区间命令只能执行一次。如果为负整数,则取绝对值,并且单位为分钟,保证下一次执行至少间隔这么多分钟。
hours也可以为&amp;quot;hh:mm-hh:mm,...&amp;quot;格式, 譬如&amp;quot;6:00-8:30,11:00-13:00,5:30-6:30&amp;quot;为每天三餐时间脚本执行一次。
timezone: 时区譬如“8”表示北京时间。(默认为8)
delay_sec: 等待指定秒数后再执行命令,防止命令被集中执行。
elsecommand: 无需执行命令command时执行。
ex:
set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin
#天翼云每天签到一次
tcron /sdcard/a &amp;quot;cloudpan189-go sign;toybox touch /sdcard/a&amp;quot; 24
#每30天清空baidu目录
tcron /sdcard/b &amp;quot;rm -rf /sdcard/baidu/*;toybox touch /sdcard/b&amp;quot; 720</description>
</item>
<item>
<title>重定向网址</title>
<link>/zh/redirect/</link>
@ -435,40 +466,6 @@ http://www.numbertheory.org/gnubc/gnubc.html
如果定义有新按钮(当前版本存在文件&amp;quot;20&amp;quot;则uweb支持向量格式图标VectorDrawable格式为compiled XML。此时所有图标文件必须都是compiled XML格式或都是普通的图像格式png,jpg,gif等。用户可将VectorDrawable XML文件放到安卓项目目录assets下面重新生成apk文件以后将apk文件解压即可得compiled XML格式图标文件。
用户可定义任意多个按钮(100个按钮毫无压力)其短按长按功能可在文件default.button及default.button2中定义格式与文件default.link完全相同每行从最后一个按钮开始重定义功能。
注意:刷新按钮及窗口按钮图标暂时不能重定义。</description>
</item>
<item>
<title>定时脚本</title>
<link>/zh/tcron/</link>
<pubDate>Sat, 13 Feb 2021 00:00:00 +0000</pubDate>
<guid>/zh/tcron/</guid>
<description>如果勾选“文件预处理”则uweb启动时运行&amp;quot;default.rc&amp;quot; shell脚本。可与tcron定时管
理工具(安装tcron)配合运行定时任务,如存储清理、网页签到等。
勾选“文件预处理”的情况下,如果存在文件&amp;quot;default.rc2&amp;quot;,则在超微浏览器成为前台时,此文件代码被执行。在超微永不退出的情况下,&amp;quot;default.rc&amp;quot;将没有任何执行机会,而&amp;quot;default.rc2&amp;quot;保证即使超微长时间不重启,定时脚本仍可以执行。
tcron usage: tcron logfile command hours [timezone delay_sec elsecommand]
指定时间范围内如果命令没有被执行过则tcron会执行一次命令。
其中logfile可以不记录任何log成功执行命令以后只需更新一下改动时间即可。
hours: 如果为正整数,则将每天划分为不同的时间区间(单位小时),每个区间命令只能执行一次。如果为负整数,则取绝对值,并且单位为分钟,保证下一次执行至少间隔这么多分钟。
hours也可以为&amp;quot;hh:mm-hh:mm,...&amp;quot;格式, 譬如&amp;quot;6:00-8:30,11:00-13:00,5:30-6:30&amp;quot;为每天三餐时间脚本执行一次。
timezone: 时区譬如“8”表示北京时间。(默认为8)
delay_sec: 等待指定秒数后再执行命令,防止命令被集中执行。
elsecommand: 无需执行命令command时执行。
ex:
set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin
#天翼云每天签到一次
tcron /sdcard/a &amp;quot;cloudpan189-go sign;toybox touch /sdcard/a&amp;quot; 24
#每30天清空baidu目录
tcron /sdcard/b &amp;quot;rm -rf /sdcard/baidu/*;toybox touch /sdcard/b&amp;quot; 720
安装default.rc模板文件termux
可能用到的命令:
termux中安装remind可配置各类提醒功能十分强大。
apt install remind
am start -n info.torapp.uweb/.wvActivity -d &#39;javascript:alert(&amp;quot;remind&amp;quot;)&#39; #提醒
其中-d后面参数可以为任意url包括超微内部&amp;quot;i:&amp;quot; url。
cron Termux下安装cronie:
apt install cronie
crontab -e
crontab例子内容如下
30,31 20-23/1 * * * node Loon/jd_live_redrain.</description>
</item>
<item>
<title>安卓系统出错诊断</title>

View File

@ -98,6 +98,12 @@
</li>
<li class="post">
<a href="tcron/index.html">
<span>定时脚本</span>
</a>
</li>
<li class="post">
<a href="redirect/index.html">
<span>重定向网址</span>
@ -194,12 +200,6 @@
</a>
</li>
<li class="post">
<a href="tcron/index.html">
<span>定时脚本</span>
</a>
</li>
<li class="post">
<a href="logcat/index.html">
<span>安卓系统出错诊断</span>

View File

@ -6,8 +6,39 @@
<description>Recent content on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Thu, 23 Nov 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="/zh/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>定时脚本</title>
<link>/zh/tcron/</link>
<pubDate>Thu, 23 Nov 2023 00:00:00 +0000</pubDate>
<guid>/zh/tcron/</guid>
<description>crontab 注意1. 必须使用单一空格作为分割符。
2. 必须同时满足日期及星期的要求功能增强crontab标准只要求满足其中一个要求。
文件&amp;quot;crontab&amp;quot;自动签到例子:
5 8,9 * * * i:a1http://m.bookschina.com/ActityDaily/AvSignIn
7 9 * * * i:a1http://m.bookschina.com/ActityDaily/AvSignInTakeQuan
6 9 * * * i:a1http://m.bookschina.com/UserCenter/SignInApi?action=SignIn
8 9 * * * i:a1http://m.bookschina.com/UserCenter/SignInAward?index=1
其中&amp;quot;i:a1&amp;quot;为对url发起&amp;quot;post&amp;quot;请求。
tcron 如果勾选“文件预处理”则uweb启动时运行&amp;quot;default.rc&amp;quot; shell脚本。可与tcron定时管
理工具(安装tcron)配合运行定时任务,如存储清理、网页签到等。
勾选“文件预处理”的情况下,如果存在文件&amp;quot;default.rc2&amp;quot;,则在超微浏览器成为前台时,此文件代码被执行。在超微永不退出的情况下,&amp;quot;default.rc&amp;quot;将没有任何执行机会,而&amp;quot;default.rc2&amp;quot;保证即使超微长时间不重启,定时脚本仍可以执行。
usage: tcron logfile command hours [timezone delay_sec elsecommand]
指定时间范围内如果命令没有被执行过则tcron会执行一次命令。
其中logfile可以不记录任何log成功执行命令以后只需更新一下改动时间即可。
hours: 如果为正整数,则将每天划分为不同的时间区间(单位小时),每个区间命令只能执行一次。如果为负整数,则取绝对值,并且单位为分钟,保证下一次执行至少间隔这么多分钟。
hours也可以为&amp;quot;hh:mm-hh:mm,...&amp;quot;格式, 譬如&amp;quot;6:00-8:30,11:00-13:00,5:30-6:30&amp;quot;为每天三餐时间脚本执行一次。
timezone: 时区譬如“8”表示北京时间。(默认为8)
delay_sec: 等待指定秒数后再执行命令,防止命令被集中执行。
elsecommand: 无需执行命令command时执行。
ex:
set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin
#天翼云每天签到一次
tcron /sdcard/a &amp;quot;cloudpan189-go sign;toybox touch /sdcard/a&amp;quot; 24
#每30天清空baidu目录
tcron /sdcard/b &amp;quot;rm -rf /sdcard/baidu/*;toybox touch /sdcard/b&amp;quot; 720</description>
</item>
<item>
<title>重定向网址</title>
<link>/zh/redirect/</link>
@ -637,40 +668,6 @@ http://www.numbertheory.org/gnubc/gnubc.html
如果定义有新按钮(当前版本存在文件&amp;quot;20&amp;quot;则uweb支持向量格式图标VectorDrawable格式为compiled XML。此时所有图标文件必须都是compiled XML格式或都是普通的图像格式png,jpg,gif等。用户可将VectorDrawable XML文件放到安卓项目目录assets下面重新生成apk文件以后将apk文件解压即可得compiled XML格式图标文件。
用户可定义任意多个按钮(100个按钮毫无压力)其短按长按功能可在文件default.button及default.button2中定义格式与文件default.link完全相同每行从最后一个按钮开始重定义功能。
注意:刷新按钮及窗口按钮图标暂时不能重定义。</description>
</item>
<item>
<title>定时脚本</title>
<link>/zh/tcron/</link>
<pubDate>Sat, 13 Feb 2021 00:00:00 +0000</pubDate>
<guid>/zh/tcron/</guid>
<description>如果勾选“文件预处理”则uweb启动时运行&amp;quot;default.rc&amp;quot; shell脚本。可与tcron定时管
理工具(安装tcron)配合运行定时任务,如存储清理、网页签到等。
勾选“文件预处理”的情况下,如果存在文件&amp;quot;default.rc2&amp;quot;,则在超微浏览器成为前台时,此文件代码被执行。在超微永不退出的情况下,&amp;quot;default.rc&amp;quot;将没有任何执行机会,而&amp;quot;default.rc2&amp;quot;保证即使超微长时间不重启,定时脚本仍可以执行。
tcron usage: tcron logfile command hours [timezone delay_sec elsecommand]
指定时间范围内如果命令没有被执行过则tcron会执行一次命令。
其中logfile可以不记录任何log成功执行命令以后只需更新一下改动时间即可。
hours: 如果为正整数,则将每天划分为不同的时间区间(单位小时),每个区间命令只能执行一次。如果为负整数,则取绝对值,并且单位为分钟,保证下一次执行至少间隔这么多分钟。
hours也可以为&amp;quot;hh:mm-hh:mm,...&amp;quot;格式, 譬如&amp;quot;6:00-8:30,11:00-13:00,5:30-6:30&amp;quot;为每天三餐时间脚本执行一次。
timezone: 时区譬如“8”表示北京时间。(默认为8)
delay_sec: 等待指定秒数后再执行命令,防止命令被集中执行。
elsecommand: 无需执行命令command时执行。
ex:
set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin
#天翼云每天签到一次
tcron /sdcard/a &amp;quot;cloudpan189-go sign;toybox touch /sdcard/a&amp;quot; 24
#每30天清空baidu目录
tcron /sdcard/b &amp;quot;rm -rf /sdcard/baidu/*;toybox touch /sdcard/b&amp;quot; 720
安装default.rc模板文件termux
可能用到的命令:
termux中安装remind可配置各类提醒功能十分强大。
apt install remind
am start -n info.torapp.uweb/.wvActivity -d &#39;javascript:alert(&amp;quot;remind&amp;quot;)&#39; #提醒
其中-d后面参数可以为任意url包括超微内部&amp;quot;i:&amp;quot; url。
cron Termux下安装cronie:
apt install cronie
crontab -e
crontab例子内容如下
30,31 20-23/1 * * * node Loon/jd_live_redrain.</description>
</item>
<item>
<title>安卓系统出错诊断</title>

View File

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/zh/_posts/</loc>
<lastmod>2023-11-04T19:38:29+08:00</lastmod>
<lastmod>2023-11-23T10:07:09+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -14,6 +14,32 @@
hreflang="zh"
href="/zh/_posts/"
/>
</url><url>
<loc>/zh/</loc>
<lastmod>2023-11-23T10:07:09+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/"
/>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/"
/>
</url><url>
<loc>/zh/tcron/</loc>
<lastmod>2023-11-23T10:07:09+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/tcron/"
/>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/tcron/"
/>
</url><url>
<loc>/zh/tags/</loc>
<lastmod>2023-06-17T07:56:09+08:00</lastmod>
@ -27,19 +53,6 @@
hreflang="zh"
href="/zh/tags/"
/>
</url><url>
<loc>/zh/</loc>
<lastmod>2023-11-14T09:24:14+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/"
/>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/"
/>
</url><url>
<loc>/zh/tags/%E5%9B%BD%E5%A4%96%E7%BD%91%E5%9D%80/</loc>
<lastmod>2023-06-17T07:56:09+08:00</lastmod>
@ -376,19 +389,6 @@
hreflang="zh"
href="/zh/icons/"
/>
</url><url>
<loc>/zh/tcron/</loc>
<lastmod>2023-05-19T15:10:23+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/tcron/"
/>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/tcron/"
/>
</url><url>
<loc>/zh/logcat/</loc>
<lastmod>2022-09-24T14:06:03+08:00</lastmod>

View File

@ -46,10 +46,19 @@
<ul class="tags">
</ul>
<p>如果勾选“文件预处理”则uweb启动时运行&quot;default.rc&quot; shell脚本。可与tcron定时管<br>
<h4 id="crontab">crontab</h4>
<p>注意1. 必须使用单一空格作为分割符。<br>
2. 必须同时满足日期及星期的要求功能增强crontab标准只要求满足其中一个要求。</p>
<p>文件&quot;crontab&quot;自动签到例子:<br>
5 8,9 * * * i:a1http://m.bookschina.com/ActityDaily/AvSignIn<br>
7 9 * * * i:a1http://m.bookschina.com/ActityDaily/AvSignInTakeQuan<br>
6 9 * * * i:a1http://m.bookschina.com/UserCenter/SignInApi?action=SignIn<br>
8 9 * * * i:a1http://m.bookschina.com/UserCenter/SignInAward?index=1</p>
<p>其中&quot;i:a1&quot;为对url发起&quot;post&quot;请求。</p>
<h4 id="tcron">tcron</h4>
<p>如果勾选“文件预处理”则uweb启动时运行&quot;default.rc&quot; shell脚本。可与tcron定时管<br>
理工具(<a href="i:0bhttps://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/tcron.tgz">安装tcron</a>)配合运行定时任务,如存储清理、网页签到等。</p>
<p>勾选“文件预处理”的情况下,如果存在文件&quot;default.rc2&quot;,则在超微浏览器成为前台时,此文件代码被执行。在超微永不退出的情况下,&quot;default.rc&quot;将没有任何执行机会,而&quot;default.rc2&quot;保证即使超微长时间不重启,定时脚本仍可以执行。</p>
<h4 id="tcron">tcron</h4>
<p>usage: tcron logfile command hours [timezone delay_sec elsecommand]<br>
指定时间范围内如果命令没有被执行过则tcron会执行一次命令。<br>
其中logfile可以不记录任何log成功执行命令以后只需更新一下改动时间即可。<br>
@ -70,22 +79,10 @@ 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>
<h4 id="cron">cron</h4>
<p>Termux下安装cronie:<br>
apt install cronie<br>
crontab -e</p>
<p>crontab例子内容如下<br>
30,31 20-23/1 * * * node Loon/jd_live_redrain.js<br>
0,1 19-21/1 * * * node Loon/jd_live_redrain2.js<br>
0,1 0,9,11,13,15,17,19,20,21,23 * * * node Loon/jd_live_redrain_nian.js<br>
0,1 0,9,11,13,15,17,19,20,21,23 * * * node Loon/jd_live_redrain_official.js<br>
30,31 12-23/1 * * * node Loon/jd_live_redrain_half.js</p>
<p>Termux下运行crond<br>
cron运行期间保持唤醒锁保证termux可以稳定运行。</p>
</div>
<p>Last Modified: 19 May 2023<br>
update bingAI/js/optionsSets.js<br>
<p>Last Modified: 23 November 2023<br>
add crontab example<br>
<pre></pre>
</p>
<script>