{{ task.task_id }}

{% if task.is_active %} {% else %} {% endif %}
{{ task.description or '暂无描述' }}
触发类型: {% if task.trigger_type == 'interval' %} 间隔执行 {% else %} Crontab {% endif %}
执行配置: {% if task.trigger_type == 'interval' %} {{ task.interval_seconds }}秒 {% else %} {{ task.cron_expression }} {% endif %}
当前状态: {% if task.is_active %} 启用 {% else %} 禁用 {% endif %}
函数名: {{ task.func_name }}
创建时间: {{ task.created_at[:19].replace('T', ' ') }}
运行历史
{% if runs %}
{% for run in runs %} {% endfor %}
运行ID 开始时间 结束时间 持续时间 状态 操作
{{ run.run_id }} {{ run.created_at | local_time }} {% if run.end_time %} {{ run.end_time | local_time }} {% else %} - {% endif %} {% if run.start_time and run.end_time %} {% set start_ts = run.start_time[:19].replace('-', '').replace(':', '').replace(' ', '') %} {% set end_ts = run.end_time[:19].replace('-', '').replace(':', '').replace(' ', '') %} {% set duration_seconds = (end_ts|int - start_ts|int) // 1000000 %} {% if duration_seconds < 60 %} {{ duration_seconds }}秒 {% elif duration_seconds < 3600 %} {{ (duration_seconds / 60)|round(2) }}分钟 {% else %} {{ (duration_seconds / 3600)|round(2) }}小时 {% endif %} {% else %} - {% endif %} {% if run.status == 'success' %} 成功 {% elif run.status == 'failed' %} 失败 {% elif run.status == 'running' %} 运行中 {% elif run.status == 'pending' %} 等待 {% elif run.status == 'skipped' %} 跳过 {% endif %} 查看日志
{% else %}

暂无运行记录

任务尚未执行过

{% endif %}