Defaults

The Defaults object in the JSON code allows you to define default parameter values for all objects at once.

The following example shows how to define scheduling criteria using the When parameter. This configures all jobs to run according to the same scheduling criteria. Note that if you also set a specific value at the job level, the job-level value overrides the value in the global-level Defaults section.

{
    "Defaults" : {
        "Host" : "HOST",
        "When" : {
            "WeekDays":["MON","TUE"],
            "FromTime":"1500",
            "ToTime":"1800"       
        }
    }
}

The following example shows how to define defaults for all objects of type Job:*.

{
    "Defaults" : {
        "Job": {
            "Host" : "HOST",
            "When" : {
                "WeekDays":["MON","TUE"],
                "FromTime":"1500",
                "ToTime":"1800"       
            }
        }
    }
 
}

The following example shows how to define defaults at the folder level that override defaults at the global level. 

{
	"Folder1": {
         "Type": "Folder",
         "Defaults" : {
          "Job:Hadoop": {
              "Host" : "HOST1",
              "When" : {
                "WeekDays":["MON","TUE"],
                "FromTime":"1500",
                "ToTime":"1800"       
             }
           }
         }
	}
}

The following example shows how to define defaults that are user-defined objects such as actionIfSuccess. For each job that succeeds, an email is sent.

{
	"Defaults" : {
        "Job": {
            "Host" : "HOST",
            "actionIfSuccess" : {
                "Type": "If",
                "CompletionStatus":"OK",
                "mailTeam": {
                  "Type": "Mail",
                  "Message": "Job %%JOBNAME succeeded",
                  "Subject": "Success",
                  "To": "team@mycomp.com"
                }
            }
        }
    }
}
Was this page helpful? Yes No Submitting... Thank you

Comments