CodebyCR / TimedAction

An easy, state-of-the-art timing Framework.
MIT License
0 stars 0 forks source link

Create a Scheduler.json #14

Closed CodebyCR closed 1 year ago

CodebyCR commented 1 year ago

The ConfigJson.hpp should be enhance to be able to hold ConfigJson Objects as Values for nested .json files.

The structure is roughly an std::map<std::string, std::variant<std::string, std::map<std::string, std::string>, ConfigJson>>

The the revised result should be able the read and write the following:

{
    "Scheduler" : {
            "Scheduler.json Path" : "./Scheduler.json",
            "Date Format" : "dd MMM YYYY - HH:MM:SS",
            "Max Threads" : "4",
            "Output to std::cout" : "true",
            "Enable Blacklists" : "true"

        },
    "Watcher" : {
            "Watch Interval" : "1000"

        },
    "Notification" : {
            "Notify" : "always",
        },
    "TimedAction" : {
            "Enable Callbacks" : "true"
    },
    "Cron" : {
            "Highlighting incorrect expressions" : "true"
    }

}
CodebyCR commented 1 year ago

At the moment the structure is implemented as std::map<std::string, std::variant<std::string, std::map<std::string, std::string>>.

You can find a valid Scheduler.json here.

The path to this config file, should be an environment variable, which should be called Scheduler_json.