mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
add crontab support as alarm clock
This commit is contained in:
parent
1fb143ab1b
commit
8c6754186c
11 changed files with 160 additions and 13 deletions
|
@ -6,7 +6,20 @@
|
|||
<description>Recent content in _posts on uweb browser: unlimited power</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en</language>
|
||||
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
|
||||
<lastBuildDate>Wed, 25 Oct 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
|
||||
<item>
|
||||
<title>cron</title>
|
||||
<link>/en/tcron/</link>
|
||||
<pubDate>Wed, 25 Oct 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>/en/tcron/</guid>
|
||||
<description>crontab For performance, the file &quot;crontab&quot; uses single space as field separator. Letters are not suppored currently. So use &quot;1&quot; for &quot;January&quot; and 2 for &quot;Tuesday&quot; etc.
|
||||
tcron With the option &quot;custom file handling&quot; enabled, &quot;default.rc&quot; runs as shell script at uweb launching time and &quot;default.rc2&quot; runs whenever uweb becomes foreground.
|
||||
Use tcron (Click to install) with &quot;default.rc&quot; or &quot;default.rc2&quot;.
|
||||
usage: tcron logfile command hours [timezone delay_sec elsecommand]
|
||||
execute &quot;command&quot; during time interval once.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Offline resources</title>
|
||||
<link>/en/offlinecache/</link>
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
"<a href="file:///data/data/info.torapp.uweb/files/default.filecap">default.filecap</a>":<a href="../filecap/index.html">custom file handling</a><br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.rc">default.rc</a>": check the option "custom file handling" to execute the shell script file during uweb launching. <a href="../tools/index.html">tcron</a> provides extra cron tools.<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.rc2">default.rc2</a>": check the option "custom file handling" to execute the shell script file when uweb returns to foreground.<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/crontab">crontab</a>":<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/engine.search">engine.search</a>": to define quick search engines (pressing right arrow button to use next engine to search). The file format is similar to <a href="../search/index.html">home5.search</a> but using "%s" as search keywords.<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.siteconf">default.siteconf</a>": to save ua, js disabling, no-image mode, forbids 3rd-party resources (js and others), active scripts, global scripts for sites. Only save the difference to default ones.<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.playrate">default.playrate</a>": fullscreen playing menu. The file format is same as <a href="../links/index.html">default.link</a>. Playing ratio menu items should have empty link parts such as ".5x:", at least one such menu is required. All other menus must be put after playing ratio menus.<br>
|
||||
|
@ -100,8 +101,8 @@
|
|||
<p>"<a href="file:///data/data/info.torapp.uweb/files/shortcut/">shortcut/</a>": dynamical shortcut, if not exist, then default to "bookmark".</p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 8 May 2023<br>
|
||||
add gissues<br>
|
||||
<p>Last Modified: 25 October 2023<br>
|
||||
add en/_posts/tcron.md<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
<script>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>/en/_posts/</loc>
|
||||
<lastmod>2023-08-20T15:44:51+08:00</lastmod>
|
||||
<lastmod>2023-10-25T13:07:04+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
@ -14,6 +14,19 @@
|
|||
hreflang="en"
|
||||
href="/en/_posts/"
|
||||
/>
|
||||
</url><url>
|
||||
<loc>/en/tcron/</loc>
|
||||
<lastmod>2023-10-25T13:03:03+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
href="/zh/tcron/"
|
||||
/>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
href="/en/tcron/"
|
||||
/>
|
||||
</url><url>
|
||||
<loc>/en/offlinecache/</loc>
|
||||
<lastmod>2023-05-09T22:48:54+08:00</lastmod>
|
||||
|
@ -213,7 +226,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/filenames/</loc>
|
||||
<lastmod>2023-05-08T21:16:14+08:00</lastmod>
|
||||
<lastmod>2023-10-25T13:07:04+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
104
en/tcron/index.html
Normal file
104
en/tcron/index.html
Normal file
|
@ -0,0 +1,104 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="../style.css" type="text/css" />
|
||||
<title>cron</title>
|
||||
<script type="text/javascript">
|
||||
function findLang(){
|
||||
let href = location.href;
|
||||
for(let i=href.length-1;i>0;i--){
|
||||
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function nav2(page){
|
||||
let i = findLang();
|
||||
location.href = location.href.substring(0,i+1)+page;
|
||||
}
|
||||
function nav2Lang(lang){
|
||||
let i = findLang();
|
||||
let href = location.href;
|
||||
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class='header'>
|
||||
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
|
||||
|
||||
|
||||
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
|
||||
|
||||
|
||||
<nav>
|
||||
</nav>
|
||||
</header>
|
||||
<br />
|
||||
|
||||
<div class="container">
|
||||
<h1 class="title">cron
|
||||
<br>
|
||||
<span class="subtitle"></span>
|
||||
</h1>
|
||||
<ul class="tags">
|
||||
|
||||
</ul>
|
||||
<h4 id="crontab">crontab</h4>
|
||||
<p>For performance, the file "crontab" uses single space as field separator. Letters are not suppored currently. So use "1" for "January" and 2 for "Tuesday" etc.</p>
|
||||
<h4 id="tcron">tcron</h4>
|
||||
<p>With the option "custom file handling" enabled, "default.rc" runs as shell script at uweb launching time and "default.rc2" runs whenever uweb becomes foreground.</p>
|
||||
<p>Use tcron (<a href="i:0bhttps://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/tcron.tgz">Click to install</a>) with "default.rc" or "default.rc2".</p>
|
||||
<p>usage: tcron logfile command hours [timezone delay_sec elsecommand]<br>
|
||||
execute "command" during time interval once.<br>
|
||||
where logfile modification time must be updated if "command" runs successfully.</p>
|
||||
<p>hours: If positive, then each day is divided into multiple intervals (unit: hour), and in each interval, the "command" runs only once.<br>
|
||||
If negative, then the unit is minute.<br>
|
||||
hours could be also in "hh:mm-hh:mm,..." format. Ex. "6:00-8:30,11:00-13:00,5:30-6:30".<br>
|
||||
timezone: an integer, default to be "8" for Beijing China (UTC+8). "0" for Greenwich UK (UTC+0).<br>
|
||||
delay_sec: execute "command" after "delay_sec" seconds.<br>
|
||||
elsecommand: executed whenever "command" not run.</p>
|
||||
<p>ex:<br>
|
||||
set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin<br>
|
||||
#Empty the folder "baidu" every 30 days.<br>
|
||||
tcron /sdcard/b "rm -rf /sdcard/baidu/*;toybox touch /sdcard/b" 720</p>
|
||||
<p><a target="_self" href="i:0hdefault.rc:../searchurl/txt/default.rc">Install example default.rc file for termux</a></p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 25 October 2023<br>
|
||||
add en/_posts/tcron.md<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
<script>
|
||||
if(location.href.indexOf("/zh/")>0){
|
||||
var script = document.createElement("script");
|
||||
script.type = "text/javascript";
|
||||
script.src = "../../js/gissues.js";
|
||||
script.setAttribute("repo","jamesfengcao/uweb");
|
||||
script.setAttribute("issue-term","title");
|
||||
script.setAttribute("theme","github-light");
|
||||
script.async = true;
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
</script>
|
||||
<script id='jsgiscus'
|
||||
src='https://giscus.app/client.js'
|
||||
data-repo="torappinfo/uweb"
|
||||
data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
|
||||
data-category="Announcements"
|
||||
data-category-id="DIC_kwDOEgNLGc4CQjsh"
|
||||
data-mapping="title"
|
||||
data-strict="0"
|
||||
data-reactions-enabled="1"
|
||||
data-emit-metadata="0"
|
||||
data-input-position="top"
|
||||
data-theme="light"
|
||||
data-lang="en"
|
||||
data-loading="lazy"
|
||||
crossorigin="anonymous" async>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
let verCode = %1%;
|
||||
let latestV = 1013;
|
||||
let latestV = 1015;
|
||||
if( verCode>=latestV) alert("No updates available!");
|
||||
else
|
||||
location.href = "https://s1.asytech.cn/s/tQrgT5kBRg8Trry/download?path=%2F&files=uweb"+
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
<sitemap>
|
||||
<loc>en/sitemap.xml</loc>
|
||||
|
||||
<lastmod>2023-08-20T15:44:51+08:00</lastmod>
|
||||
<lastmod>2023-10-25T13:07:04+08:00</lastmod>
|
||||
|
||||
</sitemap>
|
||||
|
||||
<sitemap>
|
||||
<loc>zh/sitemap.xml</loc>
|
||||
|
||||
<lastmod>2023-07-29T22:35:45+08:00</lastmod>
|
||||
<lastmod>2023-10-25T13:06:41+08:00</lastmod>
|
||||
|
||||
</sitemap>
|
||||
|
||||
|
|
|
@ -397,6 +397,7 @@ webview 80- 夜间模式</description>
|
|||
&quot;default.filecap&quot;:文件特殊处理
|
||||
&quot;default.rc&quot;:如果勾选“文件预处理”,则uweb启动时运行此shell脚本。可与tcron配合运行定时任务,如存储清理、网页签到等。
|
||||
&quot;default.rc2&quot;:如果勾选“文件预处理”,则uweb返回前台时运行此shell脚本。
|
||||
&quot;crontab&quot;:
|
||||
&quot;engine.search&quot;:格式同home5.search,搜索引擎url仅支持%s语法。(搜索词部分用%s代替),供自动顺序搜索使用。
|
||||
&quot;default.siteconf&quot;:网站独立设置,保存ua、禁用js、无图、禁用第三方(js,可疑资源)、当前激活脚本、全局脚本。当前设置与默认不同才会保存。比如当前不屏蔽第三方js,但屏蔽第三方可疑资源,则屏蔽第三方设置与默认不同,站点设置被保存。
|
||||
&quot;default.playrate&quot;:全屏播放菜单项,格式与文件default.link完全相同。倍速播放菜单链接部分为空,譬如&quot;.5x:&quot;,倍速菜单至少有一个。链接部分非空的菜单必须在所有倍速菜单之后。
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
"<a href="file:///data/data/info.torapp.uweb/files/default.filecap">default.filecap</a>":<a href="../filecap/index.html">文件特殊处理</a><br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.rc">default.rc</a>":如果勾选“文件预处理”,则uweb启动时运行此shell脚本。可与<a href="../tools/index.html">tcron</a>配合运行定时任务,如存储清理、网页签到等。<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.rc2">default.rc2</a>":如果勾选“文件预处理”,则uweb返回前台时运行此shell脚本。<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/crontab">crontab</a>":<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/engine.search">engine.search</a>":格式同<a href="../search/index.html">home5.search</a>,搜索引擎url仅支持%s语法。(搜索词部分用%s代替),供自动顺序搜索使用。<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.siteconf">default.siteconf</a>":网站独立设置,保存ua、禁用js、无图、禁用第三方(js,可疑资源)、当前激活脚本、全局脚本。当前设置与默认不同才会保存。比如当前不屏蔽第三方js,但屏蔽第三方可疑资源,则屏蔽第三方设置与默认不同,站点设置被保存。<br>
|
||||
"<a href="file:///data/data/info.torapp.uweb/files/default.playrate">default.playrate</a>":全屏播放菜单项,格式与文件<a href="../links/index.html">default.link</a>完全相同。倍速播放菜单链接部分为空,譬如".5x:",倍速菜单至少有一个。链接部分非空的菜单必须在所有倍速菜单之后。<br>
|
||||
|
@ -100,8 +101,8 @@
|
|||
"shortcut/":动态shortcut刷新目录,若不存在则默认为"bookmark"目录。</p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 15 February 2023<br>
|
||||
clarify home.css format<br>
|
||||
<p>Last Modified: 25 October 2023<br>
|
||||
add en/_posts/tcron.md<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
<script>
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
|
||||
|
||||
|
||||
<html><head><meta charset="utf-8"></head><script src="config.js" charset="utf-8"></script>
|
||||
<script src="config.js" charset="utf-8"></script>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>/zh/_posts/</loc>
|
||||
<lastmod>2023-07-29T22:35:45+08:00</lastmod>
|
||||
<lastmod>2023-10-25T13:06:41+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
|
@ -333,7 +333,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/zh/filenames/</loc>
|
||||
<lastmod>2023-02-15T07:16:07+08:00</lastmod>
|
||||
<lastmod>2023-10-25T13:06:41+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
|
@ -366,6 +366,16 @@
|
|||
</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>
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
<header class='header'>
|
||||
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
|
||||
|
||||
|
||||
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('en')">English</a>
|
||||
|
||||
|
||||
<nav>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
Loading…
Reference in a new issue