{% extends "base.html" %} {% block title %}Schedules - Flowrra{% endblock %} {% block content %} {% if scheduler_stats %}
⏰

Scheduler Status

{% if scheduler_stats.running %}Running{% else %}Stopped{% endif %}

📋

Total Schedules

{{ scheduler_stats.total_schedules }}

✅

Enabled

{{ scheduler_stats.enabled_schedules }}

â¸ī¸

Disabled

{{ scheduler_stats.disabled_schedules }}

{% else %}
â„šī¸ Scheduler Not Configured

No scheduler is currently configured for this Flowrra application.

{% endif %}
All Schedules Enabled Only

Schedules {% if enabled_only %} (enabled only) {% endif %}

{{ schedules | length }} schedule(s) found

{% if schedules %}
{% for schedule in schedules %} {% if schedule.args or schedule.kwargs %} {% endif %} {% endfor %}
ID Task Name Schedule Type Schedule Next Run Last Run Status Priority Description
{{ schedule.id|slice:":8" }} {{ schedule.task_name }} {{ schedule.schedule_type }} {{ schedule.schedule }} {{ schedule.next_run_at |default:"Never" }} {{ schedule.last_run_at |default:"Never" }} {% if schedule.enabled %}Enabled{% else %}Disabled{% endif %} {{ schedule.priority }} {{ schedule.description|default:"-" }}
Arguments: {% if schedule.args %} args={{ schedule.args }} {% endif %} {% if schedule.kwargs %} kwargs={{ schedule.kwargs }} {% endif %}
{% else %}

No schedules found{% if enabled_only %} (enabled only){% endif %}

{% endif %}

API Endpoints

GET /api/schedules - List all schedules
GET /api/schedules/{id} - Get schedule details
POST /api/schedules/cron - Create cron schedule
PUT /api/schedules/{id}/enable - Enable schedule
PUT /api/schedules/{id}/disable - Disable schedule
DELETE /api/schedules/{id} - Delete schedule

Create Schedule

Use the API endpoint to create schedules programmatically. UI form coming soon.

# Example: Create cron schedule via API
import httpx

response = httpx.post("/api/schedules/cron", json={
    "task_name": "my_task",
    "cron": "0 9 * * *",
    "enabled": True,
    "description": "Daily morning task"
})
print(response.json())
    
{% endblock %}