Skip to content

About

A comprehensive Terminal User Interface (TUI) for managing cronjobs on Debian Trixie and other Linux distributions.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Cronjob Manager TUI

A comprehensive Terminal User Interface (TUI) for managing cronjobs on Debian Trixie and other Linux distributions.

Features

  • Human-Readable Schedule Syntax: View and understand your cron schedules at a glance
  • Full CRUD Operations: Add, edit, delete, and toggle cronjobs easily
  • Live Logging: Real-time output when running jobs manually
  • Log History: Persistent log storage and viewing for each job
  • Quick Presets: Common schedule templates (hourly, daily, weekly, monthly)
  • Job Status Management: Enable/disable jobs without deleting them
  • Intuitive Keyboard Navigation: Vim-style keybindings

Requirements

  • Python 3.8+
  • cron/crontab
  • Terminal with color support

Installation

Quick Install

# Navigate to the application directory
cd cronjob-tui

# Run the setup script
./setup.sh

# Or install dependencies manually
pip3 install textual croniter

Manual Installation

# Install dependencies
pip3 install textual croniter

# Make executable (if needed)
chmod +x cronjob-manager

# Run
./cronjob-manager

Debian Trixie Specific

# Install system dependencies
sudo apt update
sudo apt install python3-pip cron

# Install Python packages
pip3 install textual croniter --break-system-packages

# Run
python3 cronjob-manager

Usage

Starting the Application

# Using the wrapper script
./cronman

# Or directly with Python
python3 cronjob-manager

Keyboard Shortcuts

Navigation

Key Action
↑/k Move up in job list
↓/j Move down in job list
Enter Select/confirm
Tab Switch between panels
Escape Close dialog/go back

Job Management

Key Action
a Add new cronjob
e Edit selected job
d Delete selected job
t Toggle job (enable/disable)
r Run job now (immediate execution)
l View job logs

General

Key Action
? Show help screen
R Refresh job list
H View execution history
q Quit application

Human-Readable Schedule Examples

The application automatically converts cron syntax to readable text:

Cron Syntax Human Readable
* * * * * Every minute
*/5 * * * * Every 5 minutes
0 * * * * Every hour on the hour
0 0 * * * Every day at midnight
0 9 * * 1-5 Every weekday at 9:00 AM
0 17 * * 1-5 Every weekday at 5:00 PM
0 0 1 * * On the 1st of every month at midnight
0 0 1 1 * Once a year on January 1st at midnight

Quick Presets

When adding or editing a job, use the preset buttons:

  • Every Minute: * * * * *
  • Hourly: 0 * * * *
  • Daily: 0 0 * * *
  • Weekly: 0 0 * * 0
  • Monthly: 0 0 1 * *

File Structure

The application stores data in ~/.cronjob-manager/:

~/.cronjob-manager/
├── config.json      # Application configuration
├── jobs.json        # Job definitions
├── history.json     # Execution history
└── logs/
    ├── job_abc123.log   # Individual job logs
    └── job_def456.log

Cron Expression Reference

Field Order

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday = 0)
│ │ │ │ │
* * * * *

Special Characters

Character Meaning
* Any value
, Value list separator
- Range of values
/ Step values
0 or 7 Sunday

Examples

# Every 15 minutes
*/15 * * * * /path/to/script.sh

# Every hour at minute 30
30 * * * * /path/to/script.sh

# Every day at 6:30 AM
30 6 * * * /path/to/script.sh

# Every Monday at 9:00 AM
0 9 * * 1 /path/to/script.sh

# First day of every month at midnight
0 0 1 * * /path/to/script.sh

# Every weekday (Mon-Fri) at 5:00 PM
0 17 * * 1-5 /path/to/script.sh

# Every 6 hours
0 */6 * * * /path/to/script.sh

# At specific times (8 AM and 8 PM)
0 8,20 * * * /path/to/script.sh

Troubleshooting

"textual not found" Error

pip3 install textual --break-system-packages

"crontab: command not found" Error

sudo apt install cron

Permission Denied

chmod +x cronjob-manager
# or run with:
python3 cronjob-manager

Colors Not Displaying Correctly

Ensure your terminal supports 256 colors:

echo $TERM
# Should show something like xterm-256color or screen-256color

Security Notes

  • Jobs are stored in user crontab (crontab -l)
  • Log files are stored in ~/.cronjob-manager/logs/
  • The application never runs with elevated privileges
  • Commands are executed with user permissions

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

MIT License - See LICENSE file for details.

Author

Created for Debian Trixie console TUI management.

About

A comprehensive Terminal User Interface (TUI) for managing cronjobs on Debian Trixie and other Linux distributions.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages