Skip to content

Latest commit

 

History

History
96 lines (70 loc) · 2.01 KB

README.md

File metadata and controls

96 lines (70 loc) · 2.01 KB

Cronjobs Dashboard

A web-based dashboard for monitoring cron jobs on Ubuntu/Linux systems.

Prerequisites

  • Python 3.x
  • Ubuntu/Linux system for production use
  • Git

Installation

1. Clone the repository:

git clone https://github.com/gabrieldesouza02/cronjobs-dashboard.git
cd cronjobs-dashboard

2. Create and activate Python virtual environment:

# Install venv if not already installed
sudo apt install python3-venv

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate

3. Install required packages:

pip install -r requirements.txt

4. Setup Database and optionally create test data:

4.1. Initialize the database and create test data (if you wish to create the database without test data, skip this step and step 4.2):

python test_data.py

4.2. Verify data was created successfully:

python query_jobs.py

4.3. Sync cron jobs from system to database (if you skipped step 4.1 and 4.2, start here):

# Deactivate venv temporarily (sudo doesn't inherit venv)
deactivate

# Run sync with sudo using venv python
sudo ./venv/bin/python sync_jobs.py

Note: Run this sync command whenever you want to update the dashboard with any changes made to system cron jobs.

5. Allow the port through firewall:

sudo ufw allow 5001

6. Run the application:

source venv/bin/activate
python run.py

Access the dashboard from any computer on your network:

http://<ubuntu-server-ip>:5001

To find your Ubuntu server's IP address:

ip addr show
# or
hostname -I

Features

  • View all system cron jobs
  • Monitor job execution history
  • Track job status and output
  • Web-based interface accessible across your local network

Development Notes

  • The cron parser only works on Ubuntu/Linux systems
  • When developing on Windows, test data is used instead of actual cron jobs
  • The application uses SQLite for data storage