Scheduler is a program that reads a schedule file and performs scheduled tasks at their designated times. It provides audio notifications for the schedule and prompts the user to confirm completion. The program features a Command Line Interface (CLI) written in Bash, which enables users to add, list, and delete scheduled tasks.
The command line interface (CLI) for Scheduler is named “sch” and is written in Bash, featuring several command line options.
- -a “SCHEDULE”: add a new schedule to the schedule file
- -lus “NUM”: List schedules, up to NUM (default: 1).
- -luc “NUM”: List schedules completion status, up to NUM (default: 1).
- -dus “NUM”: Delete schedules, up to NUM (default: 1).
- -duc “NUM”: Delete schedules completion status, up to NUM (default: 1).
- -lss “NUM”: List the schedule with the specific number of your choice.
- -lsc “NUM”: List the schedule completeion status with the specific number of your choice.
- -dss “NUM”: Delete the schedule with the specific number of your choice.
- -dsc “NUM”: Delete the schedule completeion status with the specific number of your choice.
- -las: List all schedules.
- -lac: List all schedules completion status.
- -das: Delete all schedules.
- -dac: Delete all schedules completion status.
- -u | –update: To update the scheduler.
- -r | –restart: To restart the scheduler.
- -v | –version: To see the version number of scheduler.
- -h | –help: To see usage of scheduler program.
- sch -a “SCHEDULE”
sch -a "01. 09:45AM Python +2h" sch -a "02. 01:45PM Web Development +3h 2m" sch -a "03. 03:45PM Bash Scripting +4h 2m 5s"
sch -a "01. 09:45AM Python +2h" "02. 01:45PM Web Development +3h 2m" "03. 03:45PM Bash Scripting +4h 2m 5s" sch -a "01. 09:45AM python +2h" "02. 01:45PM Web Development +3h 2m"
serial number | Schedule Time | Schedule | Completion Time |
---|---|---|---|
01. | 09:45AM | python | +2h |
02. | 01:45PM | Web Development | +3h 2m |
03. | 03:45PM | Bash Scripting | +4h 2m 5s |
- The schedule you write should always be enclosed in double quotes.
- When using double quotes, begin with a serial number followed by a period, using this format: 01., 02., 03., 10.
- Then, leave a single space and specify the initial/start time of your schedule using the 12-hour format with AM or PM, such as: 09:45AM, 01:10PM, 03:15AM.
- Do not include any spaces between the time and the AM/PM designation.
- Then, leave another space and specify the schedule that you want to do at that particular time.
- Ensure that each word in the schedule description is separated by only a single space.
- Then, leave another space and specify your completion time using the “+” symbol, followed by a time duration in this format: +2h, +3h 2m, +4h 2m 5s.
- You can only make up to 10 schedules in a day. To create additional schedules, you will either need to delete some existing schedules from those 10 schedules or utilize the overwrite functionality, as mentioned below.
- If you write the schedule with the same number again, it will overwrite the previous one. You don’t need to worry about adding the schedule in a sequential manner because it will be automatically handled. The schedule will be rearranged automatically based on their respective numbers.
- sch -lus “NUM”
sch -lus "3" sch -lus 4
- sch -luc “NUM”
sch -luc "3" sch -luc 4
- sch -dus “NUM”
sch -dus "3" sch -dus 4
- sch -duc “NUM”
sch -duc "3" sch -duc 4
- By editing the .config/scheduler/config file, you can modify the listing order direction of -lus, luc, dus, duc flags.
- Double quotes are optional for enclosing argument in almost all flags expect when using -a flag.
- sch -lss “NUM”
sch -lss "3" sch -lss 4
- sch -lsc “NUM”
sch -lsc "3" sch -lsc 4
- sch -dss “NUM”
sch -dss "3" sch -dss 4
- sch -dsc “NUM”
sch -dsc "3" sch -dsc 4
- sch -las
- sch -lac
- sch -das
- sch -dac
- sch -lus
- sch -luc
- sch -dus
- sch -duc
- sch -u | –update
- sch -r | –restart
- sch -v | –version
- sch -h | –help
- The lus, luc, dus and duc flags will work when the “LIST/DELETE_UP_TO_SCHEDULE_DIRECTION” and “LIST/DELETE_UP_TO_COMPLETION_DIRECTION” variables in the .config/scheduler/config file are set to “last”.
- The lus, luc, dus, and duc flag working because the default argument is set to 1 for both list/delete up to schedule and list/delete up to completion status.
- This program is designed only for linux users.
- This program can be installed on Arch, Ubuntu/Debian, Fedora, and OpenSUSE based distributions.
- To install this program on your Linux distribution, please follow the instructions below:
- To install scheduler, you need to clone this repository and run the
install.sh
script.
git clone https://github.com/amateur-hacker/scheduler.git cd scheduler ./install.sh
NOTE:
Dependencies will automatically install from install.sh script.