A lightweight command-line task scheduler for Unix-based systems that provides a user-friendly interface to manage cron jobs without requiring advanced knowledge of crontab syntax.
- Interactive menu-based interface
- View all currently scheduled tasks
- Add new scheduled tasks with simplified timing options:
- Hourly execution
- Daily execution
- Weekly execution
- Custom cron expressions for advanced users
- Remove existing tasks easily
- No external dependencies beyond standard Unix utilities
-
Clone this repository:
git clone https://github.com/yourusername/bash-task-scheduler.git
-
Make the script executable:
chmod +x task-scheduler.sh
-
Run the script:
./task-scheduler.sh
The script provides a simple menu-driven interface with the following options:
Shows all currently scheduled tasks with their timing and commands.
Guides you through adding a new scheduled task with various timing options:
- Hourly: Runs every hour at a random minute
- Daily: Runs once per day at a random time
- Weekly: Runs once per week on a random day at a random time
- Custom: Enter your own cron expression for advanced scheduling
Displays all tasks with numbers and allows you to remove a specific task by its number.
Exits the Task Scheduler.
The script provides a wrapper around the standard Unix crontab utility, making it easier to schedule and manage recurring tasks without needing to remember the crontab syntax. It reads and modifies your user's crontab entries to manage the scheduled tasks.
- Bash shell
- Unix-based operating system (Linux, macOS, etc.)
- Standard Unix utilities:
crontab,grep,awk, etc.
- Manages only the current user's crontab
- Does not support environment variables or multi-line commands
- Random scheduling cannot be set to specific preferred times