3using System.Threading.Tasks;
22 private DateTime? executionTime =
null;
24 private Duration? burstInterval =
null;
25 private DateTime? expires =
null;
26 private int burstCount = 1;
38 [Header(3,
"Scheduled execution time:", 10)]
40 [ToolTip(4,
"When the job is scheduled to execute.")]
44 get => this.executionTime;
45 set => this.executionTime = value;
51 [Header(5,
"Job Period:", 20)]
53 [ToolTip(6,
"Time between job executions. Defines a repetitive job.")]
58 set => this.period = value;
64 [Header(7,
"Burst count:", 30)]
66 [ToolTip(8,
"Number of times the job will be executed each period.")]
70 get => this.burstCount;
71 set => this.burstCount = value;
77 [Header(9,
"Burst Interval:", 40)]
79 [ToolTip(10,
"Time between job executions in a burst.")]
83 get => this.burstInterval;
84 set => this.burstInterval = value;
90 [Header(15,
"Expires:", 40)]
92 [ToolTip(16,
"Repetitive job is not scheduled after this point in time.")]
97 set => this.expires = value;
114 await base.NodeUpdated();
157 await this.FindNodes(Nodes);
168 IEnumerable<INode> Children = await this.
ChildNodes;
169 if (Children is
null)
172 foreach (
INode Child
in Children)
174 if (Child is T Typed)
176 else if (Child is
IGroup Group)
177 await Group.FindNodes(Nodes);
184 public override Task<IEnumerable<ICommand>>
Commands => this.GetCommands();
186 private async Task<IEnumerable<ICommand>> GetCommands()
193 Commands.AddRange(await base.Commands);
227 JobTaskNode[] Tasks = await this.FindNodes<JobTaskNode>();
237 internal async Task ExecutionTimeUpdated(DateTime?
ExecutionTime)
251 LinkedList<Parameter> Parameters = (LinkedList<Parameter>)await base.GetDisplayableParametersAsync(
Language, Caller);
253 if (this.executionTime.HasValue)
257 this.executionTime.Value));
260 if (this.period.HasValue)
267 if (this.burstInterval.HasValue)
271 this.burstInterval.Value));
278 if (this.expires.HasValue)
282 this.expires.Value));
Contains information about the execution of a job.
Base class for all job nodes.
INode Parent
Parent Node, or null if a root node.
NodeState State
Current overall state of the node.
Task< IEnumerable< INode > > ChildNodes
Child nodes. If no child nodes are available, null is returned.
Module that manages the scheduling and execution of jobs.
static async Task< bool > Remove(Job Job)
Removes any scheduled activity for the job.
static async Task Schedule(Job Job, bool OnlyIfDifferent)
Checks the schedule of a job.
Duration? Period
Gets or sets the scheduled execution time of the job.
async Task< T[]> FindNodes< T >()
Finds nodes referenced by the group node.
DateTime? Expires
Gets or sets the scheduled execution time of the job.
int BurstCount
Number of executions each period.
Duration? BurstInterval
Gets or sets the scheduled execution time of the job.
override Task< IEnumerable< ICommand > > Commands
Available command objects. If no commands are available, null is returned.
DateTime? ExecutionTime
Gets or sets the scheduled execution time of the job.
Task ExecuteJob(Language Language)
Executes the job.
override Task< bool > AcceptsChildAsync(INode Child)
If the node accepts a presumptive child, i.e. can receive as a child (if that child accepts the node ...
override Task< bool > AcceptsParentAsync(INode Parent)
If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts th...
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
override Task NodeUpdated()
Persists changes to the node, and generates a node updated event.
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
override Task RemovedFromRoot(Root Root)
Node has been removed from the root node.
async Task ExecuteJob(Query Query, Language Language, JobReportDetail ReportDetail)
Executes the job.
Task ExecuteJob()
Executes the job.
override Task AddedToRoot(Root Root)
Node has been added to the root node.
Abstract bast class for job tasks.
abstract Task ExecuteTask(JobExecutionStatus Status)
Executes the task.
Class for the root node of the Jobs data source.
A chunked list is a linked list of chunks of objects of type T .
T[] ToArray()
Returns an array containing all elements of the collection.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Basic access point for runtime language localization.
static async Task< Language > GetDefaultLanguageAsync()
Gets the default language.
DateTime-valued parameter.
Duration-valued parameter.
Class handling the reception of data from a query.
Tokens available in request.
Base Interface for all metering nodes.
Interface for nodes that are published through the concentrator interface.
JobReportDetail
How much detail to include in job reports.
Represents a duration value, as defined by the xsd:duration data type: http://www....