Issue with leOS2 for one-time tasks
There appears to be a fault with the library whereby if the only registered task is a one-shot task it doesn't get cancelled when it has executed.

Adding another periodic task in setup() (say to blink an LED every 500ms) so there are now 2 tasks instead of one works around the problem.

The way the system is written it will always try an execute task number 0 even when there are 0 tasks registered because they erroneously used a "do {...} while" construct instead of a "while { ...}" construct.



I  have filed a bug report, corrected the error, and raised a pull request with the fix in it.  Until it gets accepted you can obtain the fixed version here: https://github.com/majenkotech/leOS2