mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-23 13:18:13 -05:00
51 lines
2.2 KiB
HTML
51 lines
2.2 KiB
HTML
{{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="0 3 * * *(每天3点)">
|
||
</div>
|
||
<div class="field">
|
||
<label>命令</label>
|
||
<textarea name="Command"></textarea>
|
||
</div>
|
||
<div class="field">
|
||
<label>执行服务器ID列表</label>
|
||
<div class="ui fluid multiple servers search selection dropdown">
|
||
<input type="hidden" name="ServersRaw">
|
||
<i class="dropdown icon"></i>
|
||
<div class="default text">输入ID/备注以搜索</div>
|
||
<div class="menu"></div>
|
||
</div>
|
||
</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}} |