* Update CronScheduleTest.cpp
* Update CronScheduleTest.cpp
Edited code that was causing test to fail.
---------
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Initial commit on executed on time feature. A task was executed on time if the function call happened within one second since it expired.
* Adding tests, fixing some errors.
* Using recursirve mutex to allowing to call safely call was_executed_on_time in an Mt-environment
* Changing from boolean expression to get_delay, being even more flexibel
* Cleanup
* Adding dedicated TaskContext
* Changing to Interface-Class Approach
* Renaming to TaskInformation, making it pure virtual
* Removing unnecessary Proxy-Class
* Cleaning up
* Passing a const reference instead of a pointer to avoid nullptr checks in the callback
* Cleaning up add_schedule.
* Adding TaskInformation API to readme.
Co-authored-by: Heinz-Peter Liechtenecker <h.liechtenecker@fh-kaernten.at>
* Adding functions to remove a specific schedule (by the given name) or all scheduled tasks from the Cron class.
* Update libcron/include/libcron/Task.h
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Update libcron/include/libcron/Task.h
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Update libcron/include/libcron/Cron.h
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Update libcron/include/libcron/Cron.h
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Update libcron/include/libcron/Cron.h
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Adding Multithreading support via template, adding documentation
* Apply suggestions from code review
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Finishing suggestions from code-review (renaming elements)
Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
* Use c_encoding function
The MSVC compiler does not accept direct conversion from weekday datatype (used in the date.h dependency) to unsigned int used in the DayOfWeek Enum. However, the c_encoding function gives the necessary datatype conversion.
* Updated submodule libcron/externals/date
Co-authored-by: Heinz-Peter Liechtenecker <h.liechtenecker@fh-kaernten.at>
If time moves >=3h, then consider it a adjustment and reschedule based on the new time.
If time changes backwards <3h, prevent running tasks twice.
If forward <3h run tasks that would have run in the skipped time.