我打算用HTML5和JQuery Mobile编写一个cron作业(版本 - 1.10.2,ui和1.4.3,移动版)。我正在使用插件jquery-cron,并编写了以下代码段。
HTML - >
<div data-role="page" id="cron">
<div data-role="header" data-fullscreen="true" class="center-div"><h2>HEADER</h2> </div>
<div data-role="content">
<div id='selector'> Division for Cron </div>
</div>
<div data-role="footer" data-position="fixed" data-fullscreen="true" class="center-div"><h3>FOOTER</h3></div>
</div>
Jquery - &gt;
$('#selector').cron({
initial: "10 11 * * *",
onChange: function() {
$('#example1-val').text($(this).cron("value"));
},
useGentleSelect: true // default: false /
});
即使浏览器窗口关闭,如何设置我需要重复执行某项任务的时间间隔。以及在何处编写需要在作业开始时执行的功能。我理解如何设置间隔,即像* / 5 * * * *这只是意味着每5秒但在哪里设置它。请帮助