Difference between revisions of "Job Scheduling"

From Hornbill
Jump to navigation Jump to search
Line 10: Line 10:
  
  
==Scheduled Job List==
+
==Scheduled Job Toolbar==
  
 
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 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.
Line 16: Line 16:
 
[[Image:JobScheduleListFade.png|right|350px|link=https://wiki.hornbill.com/images/a/ad/JobScheduleList.png]]
 
[[Image:JobScheduleListFade.png|right|350px|link=https://wiki.hornbill.com/images/a/ad/JobScheduleList.png]]
  
The following optios are available:
+
 
 
{{Bullet1|Refresh|Refresh the list of Scheduled jobs}}
 
{{Bullet1|Refresh|Refresh the list of Scheduled jobs}}
 
{{Bullet1|Type|Filter the list by: Discover, Runbook, and IT Automation Jobs}}
 
{{Bullet1|Type|Filter the list by: Discover, Runbook, and IT Automation Jobs}}

Revision as of 02:51, 31 March 2020

Home > Administration > ITOM > Job Scheduling Index

Introduction

These 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.

Related Articles


Scheduled Job Toolbar

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.

JobScheduleListFade.png


  • Refresh
Refresh the list of Scheduled jobs
  • Type
Filter the list by: Discover, Runbook, and IT Automation Jobs
  • Status
Filter the list by the available statuses including All, Disabled, Scheduled, Failed, and Completed
  • Filter
Free text Search that filters the list based on Name and Tag
  • Delete Selected
This will delete any Scheduled Job that has been selected in the list using the check boxes
  • Create New
Create a new Discovery, Runbook, or IT Automation job
Information
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:

JobScheduleCreate.png
  • Discovery Schedule
Create a new scheduled job for discovering PCs and the hardware and software held on those PCs
  • Runbook Schedule
Create a new scheduled job for executing runbook automation
  • IT Automation Schedule
Schedule jobs such as installing a package on PCs


Scheduled Job

  • Name
A Scheduled Job must be given a name, which does not have to be unique
  • Tag
An optional Tag can be added which help when filtering the Scheduled Job list

Schedule

ITOMJobSchedule.png

For each schedule, a Time Zone (Default is GMT) can be specified and the given start date and time. The following options are available:

  • Run 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.
  • Run 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.
  • Run 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.
  • Run Every Period
This schedule allows for jobs to be executed every (n) minute(s) on specific weekdays in specific months
Information
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

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.