Skip to content

Create Job

Brian Brewder edited this page Oct 16, 2016 · 1 revision

To create a job, you need to create a zip file with a jobmon.json file in it, along with any other files that you want installed on the server that will run the job.

Example jobmon.json

{
	"name": "example",
	"displayName": "Example Job",
	"description": "An example job to demonstrate JobMon.",
	"status": "Enabled",
	"minLogLevel": "Info",
	"numberOfInstances": 1,
	"execute": {
		"path": "JobMonExampleJob.exe",
		"arguments": "/InstanceID {{InstanceID}} /JobMonApiUrl {{JobMonApiUrl}}"
	}
}

jobmon.json Fields

  • name: A unique identifier for the job. This is how JobMon identifies the job when it is being updated.
  • displayName: The name that is displayed in the JobMon dashboard.
  • description: A description of the job to display in the job details.
  • status: Determines if the job is enabled or not. Valid values are Enabled and Disabled.
  • minLogLevel: This value determines what logging level is stored. Valid values are Trace, Debug, Info, Warn, Error, and Fatal.
  • maxInstances: The number of instances that can be running at a time.
  • maxInstancesToKeep: The maximum number of instances that are stored. Once this limit is exceeded, JobMon will remove the oldest instance. This is important to maintaining the performance of JobMon.
  • maxTimeToCompleteInMinutes: The maximum amount of time to allow an instance to run. The autoComplete field determines what happens once the instance has exceeded this limit.
  • autoComplete: If true, JobMon will set the instance that has run beyond maxTimeToCompleteInMinutes as completed. If false, the status will be set to Error and no more instances will start until somebody changes the status back to Enabled.

Clone this wiki locally