OS Job
OS jobs are used to execute a task on a specific distributed system.
The following table describes the OS job type attributes.
Attribute |
Description |
---|---|
Run as |
Defines the Operating System account user name to execute the job. Rules:
|
Type |
Determines what the OS job executes, as follows:
|
File Path |
Defines the path to the script file, for a Script OS job. Rules:
|
File Name |
Defines the filename of the script file, for a Script and Embedded Script OS jobs. Rules:
|
Command |
Defines the command in a Command OS job. Rules:
|
Script |
Defines the script in an Embedded Script OS job. Rules:
|
#!/usr/bin/python
import sys
if (len(sys.argv) != 3):
print "Error"
exit (1)
if (sys.argv[1] != "BMC"):
print "Error"
exit (1)
if (sys.argv[2] != "Testing"):
print "Error"
exit (1)
print "Correct"
exit (0)
#!C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -File
If ($Args.count -lt 2) {
Write-Host "Error"
Exit 1
}
If ($Args[0] -cne "BMC") {
Write-Host "Error"
Exit 1
}
If ($Args[1] -cne "Testing") {
Write-Host "Error"
Exit 1
}
Write-Host "Correct"
Exit 0
#!C:\Windows\System32\cscript.exe
Set myArgs = WScript.Arguments.Unnamed
if myArgs.count <> 2 Then
wscript.echo "Error"
Wscript.Quit
End If
arg1 = WScript.Arguments.Item(0)
arg2 = WScript.Arguments.Item(1)
if strComp (arg1, "BMC") = 0 Then
if strComp (arg2, "Testing") = 0 Then
wscript.echo "Correct"
Wscript.Quit
End If
End If
wscript.echo "Error"