nezha/resource/template/component/cron.html

45 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.

{{define "component/cron"}}
<div class="ui tiny cron modal transition hidden">
<div class="header">添加计划任务</div>
<div class="content">
<form id="cronForm" class="ui form">
<input type="hidden" name="ID">
<div class="field">
<label>备注</label>
<input type="text" name="Name" placeholder="备份">
</div>
<div class="field">
<label>计划</label>
<input type="text" name="Scheduler" placeholder="* * 3 * *每天3点">
</div>
<div class="field">
<label>命令</label>
<textarea name="Command"></textarea>
</div>
<div class="field">
<label>执行服务器ID列表</label>
<input type="text" name="ServersRaw" placeholder="[10,7,19]">
</div>
<div class="field">
<div class="ui push-successful checkbox">
<input name="PushSuccessful" type="checkbox" tabindex="0" class="hidden">
<label>推送成功的消息</label>
</div>
</div>
</form>
<div class="ui warning message">
<p>
计划的格式为:<code>* * * * *</code> 分 时 天 月 星期,详情见 <a
href="https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format" target="_blank">计划表达式格式</a><br>
命令Shell 命令,就像写脚本一样就可以,如果遇到 xxx 命令找不到,可能是 <code>PATH</code> 环境变量的问题,<code>source ~/.bashrc</code>
或者使用绝对路径执行。
</p>
</div>
</div>
<div class=" actions">
<div class="ui negative button">取消</div>
<button class="ui positive right labeled icon button">确认<i class="checkmark icon"></i>
</button>
</div>
</div>
{{end}}