Definition at line 31 of file Billboard.cs.
static string Ntp.Analyzer.Monitor.Server.Billboard.Jobs |
( |
IEnumerable< Job > |
jobs | ) |
|
|
inlinestatic |
Definition at line 33 of file Billboard.cs.
References Ntp.Common.Process.Job.Description, Ntp.Common.Process.JobScheduleDescription.FixedRun, Ntp.Common.Process.JobScheduleDescription.Frequency, Ntp.Common.Process.JobScheduleDescription.InitialRun, Ntp.Common.Process.Job.JobId, Ntp.Common.Process.JobDescription.JobType, Ntp.Common.Process.JobDescription.Name, Ntp.Common.Process.JobDescription.Priority, Ntp.Common.Process.Job.Queued, Ntp.Common.Process.Job.RunCount, Ntp.Common.Process.Job.Running, and Ntp.Common.Process.Job.Schedule.
Referenced by Ntp.Analyzer.Process.Description.NotifyJob.BuildContent(), and Ntp.Analyzer.Monitor.Server.TextCommand.JobsCommand.ExecuteTextCommand().
35 var builder =
new StringBuilder();
37 builder.Append(
"ID".PadRight(3));
38 builder.Append(
"Act".PadRight(4));
39 builder.Append(
"Job".PadRight(15));
40 builder.Append(
"Que".PadLeft(5));
41 builder.Append(
"Ini".PadLeft(5));
42 builder.Append(
"Fix".PadLeft(5));
43 builder.Append(
"Freq".PadLeft(6));
44 builder.Append(
"Prio".PadLeft(5));
45 builder.Append(
"Runs".PadLeft(6));
47 builder.Append(
"Description");
50 const int size = 3 + 4 + 15 + 5 + 5 + 5 + 6 + 5 + 6 + 3 + 25;
52 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
54 IEnumerable<Job> orderedJobs = jobs.OrderBy(j => j.Description.Priority);
56 foreach (
Job job
in orderedJobs)
58 builder.Append(job.
JobId.ToString(
"00").PadRight(3));
59 builder.Append(job.
Running ?
" * " :
" ");
62 ?
"Unnamed".PadRight(15)
67 builder.Append((job.
Queued ?
" 1" :
" 0").PadLeft(5));
70 builder.Append(job.
Schedule.
Frequency.ToString(CultureInfo.InvariantCulture).PadLeft(6));
72 builder.Append(job.
RunCount.ToString(CultureInfo.InvariantCulture).PadLeft(6));
78 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
80 return builder.ToString();
bool Queued
Gets or sets a value indicating whether this Job is queued for run.
abstract int Priority
Gets the priority to use when scheduling jobs.
bool InitialRun
Gets a value indicating whether this JobScheduleDescription should do an initial run upon first call...
JobScheduleDescription Schedule
Gets the schedule.
abstract string JobType
Gets the type of the job as text.
int RunCount
Gets the number of times this Job have been executed.
int Frequency
Gets the schedule frequency in minutes.
bool Running
Gets or sets a value indicating whether this Job is running.
string Name
Gets the name.
bool FixedRun
Gets a value indicating whether this JobScheduleDescription has a fixed schedule frequency, eg. cannot be moved.
int JobId
Gets the job identifier.
JobDescription Description
Gets the description.
static string Ntp.Analyzer.Monitor.Server.Billboard.Proc |
( |
IEnumerable< Job > |
jobs | ) |
|
|
inlinestatic |
Definition at line 83 of file Billboard.cs.
References Ntp.Common.Process.Job.Description, Ntp.Common.Process.JobScheduleDescription.FixedRun, Ntp.Common.Process.JobScheduleDescription.Frequency, Ntp.Common.Process.JobScheduleDescription.InitialRun, Ntp.Common.Process.Job.JobId, Ntp.Common.Process.JobDescription.Name, Ntp.Common.Process.JobDescription.Priority, Ntp.Common.Process.Job.RunCount, Ntp.Common.Process.Job.Schedule, Ntp.Common.Process.Job.State, and Ntp.Common.Process.Job.TotalRuntime.
Referenced by Ntp.Analyzer.Monitor.Server.TextCommand.ProcCommand.ExecuteTextCommand().
85 var builder =
new StringBuilder();
87 builder.Append(
"ID".PadRight(4));
88 builder.Append(
"Job".PadRight(16));
89 builder.Append(
"Ini".PadLeft(5));
90 builder.Append(
"Fix".PadLeft(5));
91 builder.Append(
"Freq".PadLeft(7));
92 builder.Append(
"Prio".PadLeft(6));
93 builder.Append(
"Runs".PadLeft(5));
95 builder.Append(
"State".PadRight(12));
96 builder.Append(
"Time".PadRight(15));
99 const int size = 4 + 16 + 5 + 5 + 7 + 6 + 5 + 3 + 12 + 15 + 2;
101 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
103 IEnumerable<Job> orderedJobs = jobs.OrderBy(j => j.JobId);
105 foreach (
Job job
in orderedJobs)
107 builder.Append(job.
JobId.ToString(
"00").PadRight(4));
113 builder.Append(job.
Schedule.
Frequency.ToString(CultureInfo.InvariantCulture).PadLeft(7));
114 builder.Append(job.
Description.
Priority.ToString(CultureInfo.InvariantCulture).PadLeft(6));
115 builder.Append(job.
RunCount.ToString(CultureInfo.InvariantCulture).PadLeft(6));
117 builder.Append(job.
State.PadRight(12));
118 builder.Append(job.
TotalRuntime.PadLeft(15).Substring(0, 15));
119 builder.AppendLine();
122 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
124 return builder.ToString();
abstract int Priority
Gets the priority to use when scheduling jobs.
string State
Gets the current state of this Job.
bool InitialRun
Gets a value indicating whether this JobScheduleDescription should do an initial run upon first call...
JobScheduleDescription Schedule
Gets the schedule.
int RunCount
Gets the number of times this Job have been executed.
int Frequency
Gets the schedule frequency in minutes.
string Name
Gets the name.
string TotalRuntime
Gets the total time this Job have been running.
bool FixedRun
Gets a value indicating whether this JobScheduleDescription has a fixed schedule frequency, eg. cannot be moved.
int JobId
Gets the job identifier.
JobDescription Description
Gets the description.
static string Ntp.Analyzer.Monitor.Server.Billboard.Running |
( |
IEnumerable< Job > |
jobs | ) |
|
|
inlinestatic |
Definition at line 127 of file Billboard.cs.
References Ntp.Common.Process.Job.Description, Ntp.Common.Process.JobScheduleDescription.FixedRun, Ntp.Common.Process.JobScheduleDescription.Frequency, Ntp.Common.Process.JobScheduleDescription.InitialRun, Ntp.Common.Process.Job.JobId, Ntp.Common.Process.JobDescription.Name, Ntp.Common.Process.JobDescription.Priority, Ntp.Common.Process.Job.RunCount, Ntp.Common.Process.Job.Runtime, Ntp.Common.Process.Job.Schedule, and Ntp.Common.Process.Job.State.
Referenced by Ntp.Analyzer.Monitor.Server.TextCommand.RunningCommand.ExecuteTextCommand().
129 var list = jobs.ToList();
130 if (list.Count(j => j.Running) == 0)
132 return "No jobs are currently running.";
135 var builder =
new StringBuilder();
137 builder.Append(
"ID".PadRight(4));
138 builder.Append(
"Job".PadRight(16));
139 builder.Append(
"Ini".PadLeft(5));
140 builder.Append(
"Fix".PadLeft(5));
141 builder.Append(
"Freq".PadLeft(7));
142 builder.Append(
"Prio".PadLeft(6));
143 builder.Append(
"Runs".PadLeft(5));
145 builder.Append(
"State".PadRight(12));
146 builder.Append(
"Time".PadRight(15));
147 builder.AppendLine();
149 const int size = 4 + 16 + 5 + 5 + 7 + 6 + 5 + 3 + 12 + 15 + 2;
151 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
153 IEnumerable<Job> orderedJobs = list.Where(j => j.Running).OrderBy(j => j.JobId);
155 foreach (
Job job
in orderedJobs)
157 builder.Append(job.
JobId.ToString(
"00").PadRight(4));
163 builder.Append(job.
Schedule.
Frequency.ToString(CultureInfo.InvariantCulture).PadLeft(7));
164 builder.Append(job.
Description.
Priority.ToString(CultureInfo.InvariantCulture).PadLeft(6));
165 builder.Append(job.
RunCount.ToString(CultureInfo.InvariantCulture).PadLeft(6));
167 builder.Append(job.
State.PadRight(12));
168 builder.Append(job.
Runtime.PadLeft(15).Substring(0, 15));
169 builder.AppendLine();
172 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
174 return builder.ToString();
abstract int Priority
Gets the priority to use when scheduling jobs.
string State
Gets the current state of this Job.
bool InitialRun
Gets a value indicating whether this JobScheduleDescription should do an initial run upon first call...
JobScheduleDescription Schedule
Gets the schedule.
int RunCount
Gets the number of times this Job have been executed.
string Runtime
Gets the time this Job have currently been running.
int Frequency
Gets the schedule frequency in minutes.
string Name
Gets the name.
bool FixedRun
Gets a value indicating whether this JobScheduleDescription has a fixed schedule frequency, eg. cannot be moved.
int JobId
Gets the job identifier.
JobDescription Description
Gets the description.
static string Ntp.Analyzer.Monitor.Server.Billboard.Schedule |
( |
IEnumerable< ScheduledJob > |
jobs | ) |
|
|
inlinestatic |
Definition at line 177 of file Billboard.cs.
References Ntp.Common.Process.Job.Description, Ntp.Common.Process.JobScheduleDescription.FixedRun, Ntp.Common.Process.JobScheduleDescription.Frequency, Ntp.Common.Process.JobScheduleDescription.InitialRun, Ntp.Common.Process.ScheduledJob.Job, Ntp.Common.Process.Job.JobId, Ntp.Common.Process.JobDescription.Name, Ntp.Common.Process.JobDescription.Priority, Ntp.Common.Process.ScheduledJob.Run, Ntp.Common.Process.Job.RunCount, and Ntp.Common.Process.Job.Schedule.
Referenced by Ntp.Analyzer.Monitor.Server.TextCommand.ScheduleCommand.ExecuteTextCommand().
179 var builder =
new StringBuilder();
181 builder.AppendLine(
"Server time: " + DateTime.Now.ToLongTimeString());
182 builder.AppendLine();
184 builder.Append(
"ID".PadRight(4));
185 builder.Append(
"Job".PadRight(15));
186 builder.Append(
"Ini".PadLeft(4));
187 builder.Append(
"Fix".PadLeft(5));
188 builder.Append(
"Freq".PadLeft(6));
189 builder.Append(
"Prio".PadLeft(5));
190 builder.Append(
"Runs".PadLeft(6));
192 builder.Append(
"Next".PadRight(8));
193 builder.AppendLine();
195 const int size = 4 + 15 + 4 + 5 + 6 + 5 + 6 + 3 + 8 + 2;
197 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
199 IEnumerable<ScheduledJob> orderedJobs = jobs.OrderBy(j => j.Run);
203 builder.Append(job.
Job.
JobId.ToString(
"00").PadRight(4));
211 builder.Append(job.
Job.
RunCount.ToString(CultureInfo.InvariantCulture).PadLeft(6));
213 builder.Append(job.
Run.ToLongTimeString().PadLeft(8));
214 builder.AppendLine();
217 builder.AppendLine(
string.Empty.PadLeft(size,
'-'));
219 return builder.ToString();
abstract int Priority
Gets the priority to use when scheduling jobs.
DateTime Run
Gets the time of planned execution.
Job Job
Gets the job to execute.
bool InitialRun
Gets a value indicating whether this JobScheduleDescription should do an initial run upon first call...
JobScheduleDescription Schedule
Gets the schedule.
int RunCount
Gets the number of times this Job have been executed.
A job which have been scheduled for execution.
int Frequency
Gets the schedule frequency in minutes.
string Name
Gets the name.
bool FixedRun
Gets a value indicating whether this JobScheduleDescription has a fixed schedule frequency, eg. cannot be moved.
int JobId
Gets the job identifier.
JobDescription Description
Gets the description.
The documentation for this class was generated from the following file: