Type scheduling_purpose

fd::scheduling_purpose — Denote what purpose a schedule serves or the context of scheduling.


// In header: <fd/functional.h>

enum scheduling_purpose { application_uptime = = 1, task_execution = = 2 };


Some algorithms can make useful decisions knowing what purpose a schedule serves, or in other words, which context a schedule is used in.


The main objective is to define uptimes using 'fixed duration' schedules, possibly using 'action' schedules for intermittent events, like restarts. To put it in more abstract terms: 'fixed duration' schedules are executive, 'action' schedules subordinate. E.g.: schedule uptime of a perpetually running program, using 'fixed duration' schedules; 'action' schedules might be for restarting.

Scheduling concepts: Often, an action schedule will consist of a twofold event (e.g. restart: terminate, launch), hence the ending time point of an interval is the prelude for the next scheduled onset.


The main objective is to execute tasks using 'action' schedules, possibly using 'fixed duration' schedules for limiting execution times. To put it in more abstract terms: 'action' schedules are executive, 'fixed duration' schedules subordinate. E.g.: schedule execution of a self-completing task, using 'action' schedules; 'fixed duration' schedules limit the execution action to a specific uptime.