From 7dac47e0d8c0986c9ef79268bf60a164335241ac Mon Sep 17 00:00:00 2001 From: unrealdragon Date: Sat, 24 Oct 2026 14:53:04 +0530 Subject: [PATCH] bumped minor version number, minor dinit configuration fix. --- appinfo.cpp | 1 + executionmanager.cpp | 6 ++++-- main.cpp | 4 +++- startup_service.dinit | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/appinfo.cpp b/appinfo.cpp index 286a928..0276618 100644 --- a/appinfo.cpp +++ b/appinfo.cpp @@ -348,6 +348,7 @@ void AppInfo::updateNextTimeToRun() next_time_to_run_parse_failed = false; bool got_run_every = false; bool got_run_at = false; + scheduled = false; std::chrono::system_clock::time_point every_time_point, at_time_point; if(this->run_every.size() != 0) { auto next_time = parseEveryTimeFormat(run_every); diff --git a/executionmanager.cpp b/executionmanager.cpp index ab3f672..209e446 100644 --- a/executionmanager.cpp +++ b/executionmanager.cpp @@ -207,8 +207,10 @@ void ExecutionManager::run() if(ptr->getScheduled()) { ptr->addToPreviousExecutionList(pid); ptr->updateNextTimeToRun(); - std::lock_guard lock_get(this->job_list_mutex); - scheduled_list.push_back(ptr); + if(ptr->getScheduled()) { + std::lock_guard lock_get(this->job_list_mutex); + scheduled_list.push_back(ptr); + } } state_change.fetch_add(1); state_change.notify_all(); diff --git a/main.cpp b/main.cpp index 8caf0c4..82eda5f 100644 --- a/main.cpp +++ b/main.cpp @@ -102,7 +102,7 @@ For a detailed info about the json startup file use --help json.)" << std::endl; } void printVersion() { - std::cout << "StartUpRunner: Version-0.0.3 Pre-Alpha Pre-BigBang Era Edition." << std::endl; + std::cout << "StartUpRunner: Version-0.1.1 Pre-Alpha Pre-BigBang Era Edition." << std::endl; } void printDefaults() { @@ -161,6 +161,8 @@ Each App Entry contains: For Any, [time] can be a list of timestamps seperated by commas. [time] Daily: for running daily at that time. [day] [time] Weekly: for running every week on those days at that time. + Example: 1,2,3 01:30:00 Monthly + Example: Wed, Fri 02:50:00, 20:20:02 Weekly [OPTIONAL] run_on_start[boolean] : Run on initial startup as well [Only valid for scheduled tasks]. Example startup_apps.json: diff --git a/startup_service.dinit b/startup_service.dinit index 04bcdac..a6e1f4f 100644 --- a/startup_service.dinit +++ b/startup_service.dinit @@ -2,3 +2,4 @@ type = scripted command = /path_to_executable/StartUpRunner --log_dir /var/logs/StartUpRunner/ --json /path_to_startup_json/startup_apps.json logfile = /var/log/dinit/StartUpRunner.log after = network.target +restart = false