# Edicts

An Edict is an action, much like a rule, that is performed when a document is opened and at infrequent intervals while the document remains open. Edicts are useful for housekeeping chores which are unlikely to be urgent.

For example, suppose your Tinderbox document contains, among other things, a few thousand Tasks of various sorts. You’d like each task to adjust its appearance depending on a variety of factors: whether the task is important, how soon the task is due, whether the task has already been completed.

You could use a rule, inherited from the Task prototype, to perform these chores. Each morning, you’d open the document, Tinderbox would review each task in turn, and then adjust the appearance of each task, updating any tasks which had become overdue since the most recent check. Once done, though, Tinderbox’s rule manager would then check each Task again, just in case a task had changed status since the previous check. This does no particular harm, but it does use a little extra processing power and consume some battery charge, while the benefit of checking whether a task has suddenly become overdue in the previous minute is slight.

Instead, we can use an Edict to adjust the appearance. Edicts run infrequently, and so they consume less processing power and battery charge. (At present, edicts run at startup and then at intervals of approximately one hour, though these details are subject to change.)