{% extends "base.html" %} {% block title %}Maintenance Settings - {{ super() }}{% endblock %} {% block content %}

Maintenance Settings

Automatic Cleanup Rules

Configure automatic maintenance to keep your article database optimized.

Articles published more than this many days ago will be eligible for deletion
Even if articles are recent, keep no more than this many total articles

Manual Maintenance

Run maintenance tasks immediately. This will delete old articles according to the rules above.

Back to Dashboard
Current Settings
  • Days Threshold: {{ settings.days_threshold }} days
  • Max Articles: {{ settings.max_articles }}
  • Status: {% if settings.is_enabled %} Enabled {% else %} Disabled {% endif %}
  • Last Run: {% if settings.last_run %} {{ settings.last_run.strftime('%B %d, %Y at %I:%M %p') }} {% else %} Never {% endif %}
How it works
  1. Articles older than the "days threshold" are marked for deletion
  2. If total articles still exceed the "max articles" limit, the oldest remaining articles are also deleted
  3. Maintenance runs automatically based on your schedule (requires APScheduler setup)
  4. You can also run it manually using the button above
{% endblock %} {% block extra_scripts %} {% endblock %}