{% extends "base.html" %} {% block title %}任务调度 - AutoMusic{% endblock %} {% block content %}

⏰ 新建调度任务

{% set ns_suno = namespace(by_cat={}) %} {% for t in suno_templates %} {% set cat = t.category or "其他" %} {% if cat not in ns_suno.by_cat %} {% set _ = ns_suno.by_cat.update({cat: []}) %} {% endif %} {% set _ = ns_suno.by_cat[cat].append(t) %} {% endfor %} {% for category, items in ns_suno.by_cat.items() %}
{{ category }}
{% for t in items %}
{% endfor %}
{% endfor %}

📋 调度器日志

{% if logs %} {% for log in logs %}
{{ log.timestamp[11:19] }} [{{ log.level.upper() }}] {{ log.message }}
{% endfor %} {% else %}
暂无日志输出
{% endif %}

⚡ 任务列表

{% if tasks %} {% for t in tasks %} {% endfor %}
ID 任务名称 执行账号 类型/时间 目标动作 详细信息 状态 下一次运行 操作
{{ t.id }} {{ t.name }} {{ t.account_name }} {% if t.task_type == 'daily' %} 每日不定时 ({{ t.run_time }}) {% else %} 单次定时 {% endif %} {% if t.target_type == 'suno_task' %} Suno 作曲 {% else %} AI 作词 {% endif %} {{ '运行中' if t.status == 'running' else ('激活' if t.status == 'active' else ('暂停' if t.status == 'paused' else '已完成')) }} {{ t.next_run_at[:16].replace('T', ' ') if t.next_run_at else '--' }}
{% else %}
暂无调度任务
{% endif %}
{% endblock %}