Skip to content

cankoklu-db/brickswitch

Repository files navigation

BrickSwitch

A powerful application scheduler and management system with a modern web interface for automating application lifecycles.

BrickSwitch Interface

Overview

BrickSwitch is a comprehensive scheduler application that provides automated management of applications with features including:

  • Automated Scheduling: Schedule applications to start and stop at specific times
  • Daily Schedule Management: Configure daily start/stop times (e.g., 09:00 - 18:00)
  • Weekend Options: Turn off applications on weekends automatically
  • Custom Off Dates: Define specific dates when applications should remain off
  • Real-time Monitoring: Track application states (Running, Stopped, Scheduled)
  • Web Interface: Modern, intuitive dashboard for managing all scheduled applications

Features

🕒 Smart Scheduling

  • Set daily start and stop times for applications
  • Weekend shutdown options
  • Custom off-date configurations
  • Flexible scheduling with YYYY-MM-DD format support

📊 Application Management

  • View all applications in a centralized dashboard
  • Real-time status monitoring (Running/Stopped/Scheduled)
  • Individual application controls
  • Bulk operations support

🔧 Advanced Options

  • Additional off days configuration
  • Custom date exclusions
  • Debug information toggle
  • Auto-scheduler controls

🌐 Web Interface

  • Clean, modern UI with dark theme
  • Responsive design
  • Real-time status updates
  • Easy-to-use scheduling dialogs

Quick Start

Prerequisites

  • Python 3.7+
  • Flask
  • Required dependencies (see requirements.txt)
  • Service Principal Name (SPN) with Manage Access to all applications that need to be managed

Permissions Requirements

⚠️ Important: The BrickSwitch application Service Principal Name (SPN) must have Manage Access permissions on any applications that it needs to schedule and manage. Without these permissions, the scheduler will not be able to start, stop, or monitor the target applications.

To configure SPN permissions:

  1. Identify the Service Principal Name used by BrickSwitch
  2. For each target application, grant the SPN Manage Access permissions
  3. Verify permissions are properly configured before scheduling applications

Installation

  1. Clone the repository:
git clone https://github.com/cankoklu-db/brickswitch.git
cd brickswitch
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py
  1. Access the web interface at http://localhost:5000

Setting up the Scheduler Service

For production deployment, you can set up BrickSwitch as a systemd service:

# Copy the service file
sudo cp brickswitch-scheduler.service /etc/systemd/system/

# Enable and start the service
sudo systemctl enable brickswitch-scheduler
sudo systemctl start brickswitch-scheduler

See SCHEDULER_SETUP.md for detailed setup instructions.

Usage

Scheduling an Application

  1. Click on any application in the dashboard
  2. Configure the daily schedule:
    • App Start Time: When the application should start (e.g., 09:00)
    • App Stop Time: When the application should stop (e.g., 18:00)
  3. Set options:
    • Turn off on weekends: Automatically disable on weekends
    • Additional off days: Choose specific days to exclude
    • Custom Off Dates: Define specific dates (YYYY-MM-DD format)
  4. Click Save Schedule

Managing Applications

  • 🔄 Refresh: Update application statuses
  • ⏹️ Stop Auto Scheduler: Pause all automated scheduling
  • 🚀 Execute Now: Manually trigger application actions
  • 📋 View Logs: Access detailed application logs

Configuration

The application uses app.yaml for configuration settings. Key configurations include:

  • Application definitions and endpoints
  • Scheduling parameters
  • Logging settings
  • Service configurations

File Structure

brickswitch/
├── app.py                          # Main Flask application
├── scheduler.py                    # Scheduler logic and automation
├── requirements.txt                # Python dependencies
├── app.yaml                       # Application configuration
├── brickswitch-scheduler.service  # Systemd service file
├── SCHEDULER_SETUP.md            # Detailed setup guide
├── logs/                         # Application logs
└── README.md                     # This file

API Endpoints

The application provides RESTful API endpoints for:

  • Application status monitoring
  • Schedule management
  • Configuration updates
  • Log access

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions, please open an issue in the GitHub repository.


BrickSwitch - Simplifying application lifecycle management with intelligent scheduling.

About

BrickSwitch scheduler application for managing apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages