{# Linux Cron Job Scheduler Page #} {% extends "base.html" %} {# --- Page Title Block --- #} {% block title %}{{ super() }} - Cron Scheduler: {{ server_name }}{% endblock %} {# --- Head Scripts Block --- #} {% block head_scripts %} {# Define page-specific JS variables within a namespace #} {# Core utilities #} {# JS specific to Linux cron job interactions #} {% endblock %} {# --- Main Content Block --- #} {% block content %} {# Main heading for the page #}
Server Context: {{ server_name }}
{# --- Status Message Area --- #} {# Targeted by JavaScript (showStatusMessage) #} {# Server-side flash messages (handled by base.html) #} {# --- Section to Display Existing Cron Jobs --- #}List of cron jobs associated with this server context found in the user's crontab.
{# Check if table_data (passed from route) has jobs #} {% if table_data %} {# Responsive table wrapper #}Min | Hour | Day | Mon | DoW | Readable Schedule | {# Readable time #}Command Action | {# Display command #}Actions |
---|---|---|---|---|---|---|---|
{{ job.minute }} | {{ job.hour }} | {{ job.day_of_month }} | {{ job.month }} | {{ job.day_of_week }} | {# Display human-readable schedule #}{{ job.schedule_time }} | {# Display simplified command #}{{ job.command_display }} | {# Action links/buttons #}
{# Wrapper for buttons #}
{# Modify Link: Calls JS function to populate form #}
{# Arguments need escaping for JS string literals #}
Modify
{# Delete Link: Calls JS function with confirmation #}
{# Construct the full original string needed by the delete API #}
{% set original_cron_string = job.minute ~ ' ' ~ job.hour ~ ' ' ~ job.day_of_month ~ ' ' ~ job.month ~ ' ' ~ job.day_of_week ~ ' ' ~ job.command %}
Delete
|