Job Scheduling
Home > Administration > ITOM > Job Scheduling | Index |
IntroductionThese are Discover or Automation jobs that can be scheduled to execute at some point in the future, this could be once only or on a regular occurrence. A Log is produced detailing information relating to job being scheduled to execute at the allotted time. Detailed information for each execution can be obtained via the Job History, containing an entry for each time the specific Job is run. Drilling down into the Job History allows the Monitor, Console Output and Debug Log to be viewed as per Ad-Hoc Jobs discussed earlier. |
|
Scheduled Job List
The Scheduled Jobs view provides a list of all past and future scheduled jobs from here you can Refresh, Filter, Delete and Create new scheduled jobs.
The following optios are available:
- Refresh
- Filter by:
- Type [All / Discovery Jobs / Runbooks / IT Automation Jobs]
- Status [All / Disabled / Scheduled / Failed / Completed]
- Name or Tag
- Delete Selected
- Create New
- Discovery Schedule
- Runbook Schedule
- IT Automation Schedule
The view is generally refreshed when the state of Job changes, and can also be refreshed using the Refresh button at the top of the view. Where there are a large number of entries, paging is available using the standard list control feature.
Creating a Scheduled Job
There are three types of scheduled Jobs:
File:SchCreateJob.png
Configuring the schedule for each of these is the same, they can be; Execute Once, Daily, Monthly or "Every (n) Minutes".
File:SchJobDetailsSchedule.png
A Scheduled Job must be given a name, which does not have to be unique, and an optional Tag added (useful when filtering). Once created, there will be a Log and a Job History.
Details
For each schedule, a Time Zone (Default is GMT) can be specified and the given start date and time. The Hornbill Scheduling engine provides the schedules; the following options are available:
- Run Once
- Run Daily
- Run Monthly
- Run Every Period
Except for "Run Once", each Job will be run a configurable number of times after which the scheduled Job will stop. If you want to run the Job indefinitely, you will need to change the default value of 10 to -1.
Once
These Jobs are executed once at the scheduled time and will stay in the Job scheduling list with the status "Waiting" and once finished either "Completed" or "Failed".
The scheduled date can be selected via the calendar control and the time from the drop-down buttons.
Daily
A Job can be run every day of the week at a particular time or for particular days in the week. It is also possible to specify that the schedule be executed x number of times (10 by default). Setting the option to "-1" enables the schedule never to expire.
File:SchJobDetailsScheduleDaily.png
Monthly
Monthly jobs can are scheduled to run on a particular date and then on the same day and time every month or particular months in the year.
File:SchJobDetailsScheduleMonthly.png
Every Period
This schedule allows for jobs to be executed every (n) minute(s) on specific weekdays in specific months
File:SchJobDetailsSchedulePeriod.png
Log
This view provides a list of logs for the selected job, including the Run ID, Log creation Timestamp and Status. This view is only available once the first scheduled job has been executed.
A log entry will be created for each time the scheduled job is triggered and placed on the job queue. Clicking on the Run ID button i.e. [View Log 123] will reveal the log entry details. The details shown will differ dependant on the type of job that is scheduled and whether it succeeded or failed. All entries will contain a <jobId> tag which includes the ID of the Job placed on the queue. The ID can is used to identify a listing on the Job History list or the Job Queue, providing access to the Job Details, Monitoring, Console and Logs.
The following are some examples of successful and error log entries.
IT Automation
Scheduled XMLMC call success:
<?xml version="1.0" encoding="utf-8" ?> <methodCallResult status="ok"> <params> <job> <jobId>447</jobId> <computer>computer:EXCH2K16</computer> <sisTarget>sis:TEST</sisTarget> <childJobCount>0</childJobCount> </job> </params> </methodCallResult>
Successful Discovery
Scheduled XMLMC call success:
<?xml version="1.0" encoding="utf-8" ?> <methodCallResult status="ok"> <params> <jobId>349</jobId> </params> </methodCallResult>
Failed Discovery
Scheduled XMLMC call failed:
<?xml version="1.0" encoding="utf-8" ?> <methodCallResult status="fail"> <state> <code>0203</code> <service>automation</service> <operation>sisRunDiscoveryJob</operation> <error>Non-digit characters found in the element <ldapCredentials>, the expected data type is 'unsignedInt'. The value was [] at location '/methodCall/params/options/ldapCredentials'</error> </state> </methodCallResult>
Job History
The Job History provides a similar list to that used for the Job Queue, minus details of the existence of Child Jobs. Like the Log, it contains an entry for each execution of the scheduled job. Here it is possible to access the Job execution in the same way as can be achieved via the Job Queue where these jobs will also be visible.
It is not possible to Delete a Job while the status is in a "Running" state and or Run if in a "Deferred" state. Clicking on the job name will display the details of the Job identically to that seen via the Job Queue.