TasksScheduler is a system which runs scheduled tasks by using a cron-like pattern
TasksScheduler automatically executes scheduled tasks. The system loads tasks from a CSV file and executes them automatically when scheduled. The tasks are executed sequentially and also supports simultaneous executions by using a multithreaded architecture.
struct Task {
std::string command;
cron::cronexpr cron_expression;
std::time_t next_execution;
};
The CSV file has 4 columns which represent the command and the time in which it needs to be executed.
minute | hour | day_of_week | command |
---|---|---|---|
24 | 4 | 2 | task1 |
57 | 17 | 5 | task2 |
11 | 20 | 0 | task3 |
This project was written using Microsoft Visual Studio 2019 and C++14, other versions may not work.
croncpp.h
: https://github.com/mariusbancila/croncpp