Skip to main content

A simple task scheduling application for commands and python.

Project description

ZScheduler

A high-performance task scheduling application with both GUI and CLI interfaces for scheduling commands and Python scripts.

List

Calendar

Statistics

โœจ Features

  • ๐Ÿ–ฅ๏ธ GUI Application: Intuitive PyQt6-based interface with multiple views
  • โŒจ๏ธ CLI Interface: Command-line interface for automation and scripting
  • ๐Ÿ“… Multiple Views: List, Calendar, Timeline, and Statistics views
  • ๐ŸŽจ Themes: Dark and Light themes for comfortable usage
  • ๐Ÿ”” System Tray: Run in background with system tray integration
  • ๐Ÿ“Š Statistics: Monitor execution statistics and performance metrics
  • โฐ Flexible Scheduling: Interval, cron, and one-time schedules
  • ๐Ÿ”„ Task Management: Pause, resume, edit, and duplicate schedules

๐Ÿ“ฆ Installation

From PyPI (Recommended)

pip install zscheduler

From Source

git clone https://github.com/mexyusef/zscheduler.git
cd zscheduler
pip install -r requirements.txt

๐Ÿš€ Quick Start

GUI Application

# After pip install
zscheduler

# Or alternatively
zscheduler-app

CLI Interface

# After pip install
zscheduler-cli --help

# List all schedules
zscheduler-cli list

# Add a browser task
zscheduler-cli add-browser-task --browser firefox --profile "default" --url "https://gmail.com"

๐Ÿ–ฅ๏ธ GUI Application Usage

Starting the GUI

# Using installed command
zscheduler

# From source
python run.py

Creating Schedules

  1. Click "New" in the toolbar or use File > New Schedule

  2. Fill in details:

    • Name: Descriptive name for the schedule
    • Command: Command to execute (e.g., python script.py, notepad.exe)
    • Type: Choose from Interval, Cron, or One-time
    • Parameters: Set timing based on selected type
  3. Click "Save" to create the schedule

Managing Schedules

  • โœ๏ธ Edit: Select a schedule and click "Edit" to modify
  • โธ๏ธ Pause/Resume: Control execution without deleting
  • ๐Ÿ—‘๏ธ Delete: Remove unwanted schedules
  • ๐Ÿ“‹ Duplicate: Create a copy of existing schedule
  • ๐Ÿ“ค Export/Import: Save/load schedule configurations

Views

  • ๐Ÿ“‹ List View: Tabular view of all schedules with status
  • ๐Ÿ“… Calendar View: Visualize schedules on calendar
  • ๐Ÿ“ˆ Timeline View: Horizontal timeline of scheduled tasks
  • ๐Ÿ“Š Statistics: Execution metrics and performance data

Keyboard Shortcuts

  • Ctrl+Q: Quit application
  • Ctrl+N: New schedule
  • Ctrl+S: Save configuration
  • Ctrl+E: Edit selected schedule
  • F5: Refresh schedules

โŒจ๏ธ CLI Interface Usage

Available Commands

# Show help
zscheduler-cli --help

# List all schedules
zscheduler-cli list

# Add browser task
zscheduler-cli add-browser-task [options]

# Run schedule immediately
zscheduler-cli run <schedule_id>

# Remove schedule
zscheduler-cli remove <schedule_id>

Adding Browser Tasks

# Basic browser task
zscheduler-cli add-browser-task \
  --browser firefox \
  --profile "default" \
  --url "https://gmail.com" \
  --name "Check Gmail"

# Recurring browser task (every 30 minutes)
zscheduler-cli add-browser-task \
  --browser chrome \
  --profile "work" \
  --url "https://calendar.google.com" \
  --interval 1800 \
  --name "Check Calendar"

# One-time browser task
zscheduler-cli add-browser-task \
  --browser firefox \
  --profile "personal" \
  --url "https://github.com" \
  --once "2024-12-25T09:00:00" \
  --name "Christmas GitHub Check"

# Cron-based browser task (weekdays at 9 AM)
zscheduler-cli add-browser-task \
  --browser firefox \
  --profile "work" \
  --url "https://mail.company.com" \
  --cron "0 9 * * 1-5" \
  --name "Work Email"

# Incognito mode
zscheduler-cli add-browser-task \
  --browser chrome \
  --profile "default" \
  --url "https://private-site.com" \
  --incognito \
  --name "Private Browsing"

Managing Schedules via CLI

# List all schedules with details
zscheduler-cli list

# Run a specific schedule now
zscheduler-cli run abc123def456

# Remove a schedule
zscheduler-cli remove abc123def456

๐Ÿ“ Configuration

ZScheduler stores configuration and data in your home directory:

  • ~/.zscheduler/config.json: Application settings and preferences
  • ~/.zscheduler/schedules.json: Saved schedules and tasks
  • ~/.zscheduler/logs/zscheduler.log: Application logs and debug info

๐Ÿ”ง Advanced Usage

Integration with browser-launcher

ZScheduler works seamlessly with browser-launcher for managing browser profiles:

# List Firefox profiles
browser-launcher list-profiles --browser firefox

# Schedule multiple profiles
zscheduler-cli add-browser-task --browser firefox --profile "profile1" --url "https://gmail.com"
zscheduler-cli add-browser-task --browser firefox --profile "profile2" --url "https://calendar.google.com"

Batch Operations

Create multiple schedules using scripts:

#!/bin/bash
# Schedule multiple Gmail accounts
profiles=("work" "personal" "backup")
for profile in "${profiles[@]}"; do
  zscheduler-cli add-browser-task \
    --browser firefox \
    --profile "$profile" \
    --url "https://mail.google.com" \
    --interval 3600 \
    --name "Gmail $profile"
done

System Integration

Windows Task Scheduler

# Run ZScheduler at startup
schtasks /create /tn "ZScheduler" /tr "zscheduler" /sc onstart

Linux Systemd

# ~/.config/systemd/user/zscheduler.service
[Unit]
Description=ZScheduler Task Manager
After=graphical-session.target

[Service]
Type=simple
ExecStart=/usr/local/bin/zscheduler
Restart=always

[Install]
WantedBy=default.target

๐Ÿ› ๏ธ Development

Project Structure

zscheduler/
โ”œโ”€โ”€ pyproject.toml          # Package configuration
โ”œโ”€โ”€ README.md               # This documentation
โ”œโ”€โ”€ LICENSE                 # MIT License
โ”œโ”€โ”€ requirements.txt        # Dependencies
โ”œโ”€โ”€ run.py                  # Development launcher
โ”œโ”€โ”€ zscheduler_app/         # Main application package
โ”‚   โ”œโ”€โ”€ main.py             # GUI entry point
โ”‚   โ”œโ”€โ”€ cli/                # CLI interface
โ”‚   โ”‚   โ””โ”€โ”€ cli.py          # CLI commands
โ”‚   โ”œโ”€โ”€ config/             # Configuration management
โ”‚   โ”œโ”€โ”€ data/               # Data persistence
โ”‚   โ”œโ”€โ”€ scheduler/          # Core scheduling logic
โ”‚   โ”œโ”€โ”€ themes/             # UI themes and styling
โ”‚   โ””โ”€โ”€ ui/                 # GUI components
โ””โ”€โ”€ zscheduler_lib/         # Core scheduling library
    โ””โ”€โ”€ zscheduler/         # Library modules
        โ”œโ”€โ”€ core/           # Core scheduling classes
        โ”œโ”€โ”€ tasks/          # Task types
        โ”œโ”€โ”€ events/         # Event system
        โ””โ”€โ”€ utils/          # Utilities

Building from Source

# Clone repository
git clone https://github.com/mexyusef/zscheduler.git
cd zscheduler

# Install dependencies
pip install -r requirements.txt

# Run from source
python run.py                    # GUI
python -m zscheduler_app.cli.cli # CLI

# Build package
python -m build

# Install locally
pip install dist/zscheduler-*.whl

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Commit changes: git commit -am 'Add feature'
  4. Push to branch: git push origin feature-name
  5. Submit a Pull Request

๐Ÿ“„ License

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

๐Ÿš€ Future Plans

  • ๐Ÿ”Œ Plugin System: Extensible architecture for custom functionality
  • ๐ŸŒ Web Interface: Browser-based management interface
  • ๐Ÿ“ฑ Mobile App: Companion mobile application
  • โ˜๏ธ Cloud Sync: Synchronize schedules across devices
  • ๐Ÿค– AI Integration: Smart scheduling suggestions
  • ๐Ÿ“ˆ Advanced Analytics: Detailed performance insights
  • ๐Ÿ”— API Integration: REST API for external integrations

๐Ÿ†˜ Support

๐Ÿท๏ธ Version

Current version: 0.0.2

For changelog and release notes, see Releases.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zscheduler-0.0.2.tar.gz (56.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zscheduler-0.0.2-py3-none-any.whl (66.9 kB view details)

Uploaded Python 3

File details

Details for the file zscheduler-0.0.2.tar.gz.

File metadata

  • Download URL: zscheduler-0.0.2.tar.gz
  • Upload date:
  • Size: 56.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for zscheduler-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ad8dc84d058525661794e6a44faa1608578b2eb3ee27fdbaec440b602d491a34
MD5 31df4d4892348826bf50bbb8ce554458
BLAKE2b-256 90ecf97272be8dbb8a579515b8ca68a93deaafc6f83af544fb064562fad02b06

See more details on using hashes here.

File details

Details for the file zscheduler-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: zscheduler-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 66.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for zscheduler-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2c03d2409409161a40371db370442f5317e1b9d0d154ef22fd7fba6a910b8017
MD5 c04be00e23c8157c8fea0a59710a5d07
BLAKE2b-256 0b74f833a6e88da5c37ec422e0499cd6634f3a194858b8b2245a01efe699fffe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page