OS Job
OS jobs are used to execute a task on a specific distributed system.
To create an OS job, see Creating a Job.
The following table describes the OS job type attributes.
Attribute |
Description |
---|---|
Run as |
Defines the operating system account username that is authorized to execute the job. Rules:
|
Type |
Determines what the OS job executes, as follows:
|
File Path |
Defines the directory where the script file is saved. Rules:
|
File Name |
Defines the script or embedded script filename. 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"