{# Cron jobs, as one swappable section. Each job is a row whose rail carries the last run's verdict: green for exit 0, red for anything else, neutral while it has never run. The schedule is in words with the exact OnCalendar expression beside it in mono, because "daily" is what a person scans for and the expression is what they paste into a terminal to check. The command is the unit's own ExecStart value, verbatim in mono. Deleting demands the job's exact name typed back, compared server-side. A refused action renders at 200 with the refusal inline: htmx does not swap an error status, so answering 4xx would freeze the screen and report nothing. #} {% import "_macros.html" as m %}
{% if problem %} {{ m.problem(problem.fix, problem.output) }} {% endif %} {% if notice %}

{{ notice }}

{% endif %} {% if jobs %}
{% for job in jobs %}
{{ job.name }} {{ m.badge(job.exit_state, job.exit_text) }} {% if not job.enabled %}{{ m.badge("idle", "disabled") }}{% endif %} {{ job.schedule }} {{ job.on_calendar }} next {{ job.next_run }} last {{ job.last_run }} {% if job.app_domain %}app {{ job.app_domain }}{% endif %} as {{ job.user }} {{ job.command }}
{% endfor %}
{% else %}

No cron jobs. A job here is a systemd timer running one command on a schedule, with its output in the journal and its exit code recorded, so "did last night's run work" has an answer.

{% endif %}
Runs without a shell: the line is split into arguments and executed directly, so pipes, && and globs are plain text here. For shell features, write /bin/sh -c '…' as the command.
Used only when the schedule is custom. A systemd calendar expression, as systemd-analyze calendar accepts it.
Optional. The job runs in the application's directory unless a working directory is given below.
Empty means the configured service user.