Cronicle Task Scheduler

Status: Live
Domain: scheduler.haiven.local
Port: 3012
Category: Infrastructure

Web-based task scheduler with job history, plugin support, and multi-server capabilities. Provides a centralized UI for managing all scheduled maintenance tasks, scripts, and automated workflows on the Haiven server.

Overview

Cronicle replaces scattered crontab entries with a unified web interface for:
- Viewing, running, and managing ALL scheduled tasks
- Job history with output logs
- On-demand execution for any script
- Webhook triggers for external integrations
- Alerting via webhooks (Uptime Kuma integration)

Architecture

                                    +-----------------+
                                    |    Traefik      |
                                    |   (TLS/Proxy)   |
                                    +--------+--------+
                                             |
                                             | HTTPS
                                             v
+----------------+              +------------------------+
|   Web UI       |<------------>|      Cronicle          |
| scheduler      |   :3012      |  (cronicle-edge)       |
| .haiven.local  |              +------------------------+
+----------------+                       |
                                        |
              +-------------------------+-------------------------+
              |                         |                         |
              v                         v                         v
      +--------------+         +--------------+         +--------------+
      | Host Scripts |         | Docker Socket|         | Log Files    |
      | /usr/local   |         | (Container   |         | /var/log     |
      | /bin         |         |  Management) |         |              |
      +--------------+         +--------------+         +--------------+

Quick Start

1. Access Web UI

Navigate to https://scheduler.haiven.local

Default Credentials:
- Username: admin
- Password: admin

Important: Change the admin password immediately after first login.

2. Create Your First Job

  1. Click Jobs in the top navigation
  2. Click New Job
  3. Configure:
    - Title: Test Job
    - Category: Maintenance
    - Plugin: Shell Script
    - Target: All Servers
    - Schedule: Daily at 2:00 AM
  4. Add script content
  5. Click Save

3. Run Job Manually

  1. Go to Jobs list
  2. Find your job
  3. Click Run Now
  4. View output in Job History

Configuration

Environment Variables

Variable Description Default
CRONICLE_SECRET_KEY Encryption key for sensitive data Required
CRONICLE_base_app_url External URL for proper routing https://scheduler.haiven.local
TZ Timezone America/New_York

Volume Mounts

Container Path Host Path Purpose
/opt/cronicle/data ./data Persistent job data
/opt/cronicle/logs ./logs Job execution logs
/opt/cronicle/plugins ./plugins Custom plugins
/mnt/apps/docker /mnt/apps/docker:ro Access to compose files
/host/scripts /usr/local/bin:ro Host maintenance scripts
/host/var/log /var/log:ro Host system logs
/var/run/docker.sock /var/run/docker.sock:ro Docker container management
/mnt/models /mnt/models:ro Model discovery scripts

Scheduled Jobs

Pre-configured Jobs (from migration)

Job Schedule Category Purpose
Journal Cleanup Daily 2 AM Maintenance Clean systemd journal logs
Daily Log Analysis Daily 7 AM Monitoring Analyze system errors and health
Disk Space Monitor Hourly Monitoring Check disk usage, emergency cleanup
Log Ship to NAS Weekly Sun 3 AM Backups Archive logs to network storage
Model Discovery Daily 6 AM AI Services Discover new GGUF models

Creating Custom Jobs

Jobs can execute:
- Shell scripts - Bash/sh scripts
- Docker commands - Container management via mounted socket
- Python scripts - Using system Python
- HTTP requests - Webhook plugin for API calls

API Reference

Health Check

curl https://scheduler.haiven.local/api/app/ping

Statistics

curl https://scheduler.haiven.local/api/app/stats

With API Key (for programmatic access)

curl -H "X-API-Key: your-api-key" \
  https://scheduler.haiven.local/api/app/get_schedule

Integration

Uptime Kuma

Configure push monitors for critical jobs:

  1. In Uptime Kuma, create a Push monitor
  2. Copy the push URL
  3. In Cronicle job settings, add the URL as a success webhook
  4. Set heartbeat interval matching job schedule

Prometheus

Metrics available at /api/app/stats:

# prometheus.yml
scrape_configs:
  - job_name: 'cronicle'
    static_configs:
      - targets: ['cronicle:3012']
    metrics_path: '/api/app/stats'

Grafana

Import or create dashboards showing:
- Job success/failure rates
- Job duration trends
- Active vs completed jobs
- Server health

Troubleshooting

Service Won't Start

# Check logs
docker logs cronicle

# Verify data directory permissions
ls -la /mnt/apps/docker/infrastructure/cronicle/data

# Check container status
docker ps -a | grep cronicle

Jobs Fail with Permission Errors

# Verify scripts are executable
chmod +x /usr/local/bin/your-script.sh

# Test Docker socket access
docker exec cronicle docker ps

Web UI Not Accessible

# Check Traefik is routing correctly
docker logs traefik | grep cronicle

# Verify container labels
docker inspect cronicle --format='{{json .Config.Labels}}' | jq

Jobs Not Running on Schedule

  1. Check server time: date
  2. Verify server is in "All Servers" group
  3. Check job is enabled (not paused)
  4. Review job history for errors

File Structure

/mnt/apps/docker/infrastructure/cronicle/
├── docker-compose.yml    # Service definition
├── .env                  # Secret key configuration
├── data/                 # Cronicle persistent data
├── logs/                 # Job execution logs
├── plugins/              # Custom plugins (optional)
├── README.md            # This file
└── USER_GUIDE.md        # Detailed usage guide

Service Management

# Start
cd /mnt/apps/docker/infrastructure/cronicle && docker compose up -d

# Stop
docker compose down

# Restart
docker compose restart

# View logs
docker logs -f cronicle

# Check health
docker inspect cronicle --format='{{.State.Health.Status}}'

Security

Resources