DayTimer allows scheduling actions to happen at specific times of day. This can be useful for installations that run unattended in museum or gallery situations. A DayTimer is stored by name, and can keep multiple actions to run at different times of day. There is a global DayTimer instance which may suffice for simple uses.
a global dictionary where all DayTimers are stored.
look up a DayTimer in DayTimer.all by name.
A global instance of DayTimer provided for convenience.
add an action at <id> to the top DayTimer dates.
id |
a symbol for the action to add to it. |
test |
a test whether to do the action at the current date/time. can be a function that looks at current date, or a list of [hour, minute, second] values. |
func |
the action to do when the time is right (test is true) |
remove the action at <id> in the top DayTimer.
start the top DayTimer.
stop the top DayTimer.
store a new DayTimer or access an existing instance at the given name; optionally give it an id, a test whether the time of day is right, and the corresponding action.
name |
a symbol for the DayTimer instance name. |
id |
a symbol for the action to add to it. |
test |
a test whether to do the action at the current date/time. can be a function that looks at current date, or a list of [hour, minute, second] values. |
func |
the action to do when the time is right (test is true) |
A new or existing DayTimer.
get the DayTimer name
a Symbol
a dict of the named actions to do
add an action at <id> to the DayTimer dates.
id |
a symbol for the action to add to it. |
test |
a test whether to do the action at the current date/time. can be a function that looks at current date, or a list of [hour, minute, second] values. |
func |
the action to do when the time is right (test is true) |
remove an action from dates by id
id |
start the DayTimer.
stop the DayTimer.
internal - a SkipJack that runs when DayTimer is active.
internal - checks which time tests for actions match the current time, and performs the actions if any.