Marks the beginning and the end of a job within a Windows Script file (*.wsf).
|
---|
<job [id=JobID]>
job code
</job> |
Arguments
- JobID
Optional. Uniquely identifies the job within the scope of the Windows Script file.
Remarks
Example
The following script example is a Windows Script file called myScript.wsf
. This file contains two separate jobs, each written in a different scripting language. The first job, written in VBScript, is given the identifier DoneInVBS
. The second job, written in JScript, is given the identifier DoneInJS
.
| Copy Code |
---|
<package>
<job id="DoneInVBS">
<?job debug="true"?>
<script language="VBScript">
WScript.Echo "This is VBScript"
</script>
</job> <job id="DoneInJS">
<?job debug="true"?>
<script language="JScript">
WScript.Echo("This is JScript");
</script>
</job>
</package> |
To run the second job in the Windows Script file, myScript.wsf, type the following at the command prompt.
| Copy Code |
---|
cscript myScript.wsf //job:DoneInJS |
To run both jobs in myScript.wsf
, type the following at the command prompt.
| Copy Code |
---|
cscript myScript.wsf //job:DoneInVBS//job:DoneInJS |
See Also